No Such File to Load -- Bundler/Setup in Rails 3.2 with Passenger

no such file to load -- bundler/setup in Rails 3.2 with Passenger

Create a .htaccess in your root dir and use it to specify the GEM_PATH.

For example:

SetEnv GEM_PATH /home/dinduks/.rvm/gems/ruby-1.9.3-p0

Passenger RVM Error: cannot load such file -- bundler/setup

You have

deployment@currienet:/$ which ruby
/home/deployment/.rvm/rubies/ruby-1.9.3-p194/bin/ruby

and

PassengerRuby /usr/local/bin/ruby

this is not what you want. rvm has an option to set up an interpreter to use as passenger's default interpreter. https://rvm.io/integration/passenger/

Also (seeing your last edit) maybe you needto install rvm system-wide, as passenger will run as root.

Phusion Passenger: `no such file to load -- bundler`

I was able to fix this by setting GEM_HOME in my .htaccess file:

SetEnv GEM_HOME /home3/webgemla/.rvm/gems/ruby-1.9.3-p194

I'm experiencing other problems now (i.imgur.com/cMMmW.png), but at least this one seems to be solved.

cannot load such file -- bundler/setup (LoadError)

It could be that there was a previous Ruby env installed on your system prior to your installation of 2.0? This might have had an existing GEM_PATH that lead to the /1.8 directory which the installation of version 2.0 simply kept.

The problem you where likely having, then, was that Passenger/Apache was looking in the /2.0 directory when in fact the gems were in the /1.8 directory. Your explicitly telling apache to use the /1.8 directory thus makes sense to fix the problem.

SetEnv GEM_HOME /usr/lib/ruby/gems/1.8

You might also try using the Ruby Version Manager to handle multiple Ruby envs.

Some things I found in Google:

  • New to Ruby and am having trouble with LOAD_PATH
  • http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices/
  • http://guides.rubygems.org/faqs/


Related Topics



Leave a reply



Submit