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
How to Use 'Debugger' and 'Pry' When Developing a Gem? (Ruby)
Rails - How to Add Contacts to Sendgrid Marketing Campaigns via API
Error When Pushing to Heroku - ...Appear in Group - Ruby on Rails
How to Marshal a Hash with Arrays
Scope That Has Three Levels Deep Joins
How to Set Up These Crud Controller Actions for Has_Many_Polymorphs and an Error
Slicing of Arrays in Ruby Returns Different Result - Nil VS. Empty Array
Pass Array Hidden Field in Nested Model Rails
Test Whether a Ruby Class Is a Subclass of Another Class
Intermingling Attr_Accessor and an Initialize Method in One Class
Enter & Ioerror: Byte Oriented Read for Character Buffered Io
Webpack Error on Heroku Deployment
Ruby Implementation Win32API Get Mouse Scroll/Wheel Input
Define a Class Method in a Module
Iterating Over the Registers of a Yardoc '@Macro'
Adding a String in Front of a Parameter for a Form