I'm trying to deploy a draft of my first Rails app. It works great on my local WEBRick server.
However, on my Ubuntu VPS running Apache2 & Passenger, when I navigate to the app in my browser, I get:
Error message:
no such file to load -- bundler/setup
Exception class:
LoadError
With the following backtrace:
0 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
1 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `require'
2 /home/user/public/foo.com/config/boot.rb 6
3 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
4 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `require'
5 /home/user/public/foo.com/config/application.rb 1
6 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
7 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `require'
8 /home/user/public/foo.com/config/environment.rb 2
9 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
10 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `require'
11 config.ru 3
12 /usr/lib/ruby/vendor_ruby/rack/builder.rb 51 in `instance_eval'
13 /usr/lib/ruby/vendor_ruby/rack/builder.rb 51 in `initialize'
14 config.ru 1 in `new'
15 config.ru 1
The app was built with Ruby v1.9.3 (or so I thought), which I've installed on Ubuntu (in the app root, ruby -v
returns ruby 1.9.3p286 (2012-10-12 revision 37165) [i686-linux]
).
As per this question, I've run gem install bundle
and bundle install
in the app root. I've also imported the correct gemset
from my local machine to the VPS app root.
As per this question, I attempted to change the gem set to /home/user/.rvm/gems/ruby-1.9.3-p286@foo
(where foo is that name of the gemset in use), but this just made the backtrace longer.
Any help further troubleshooting this would be much appreciated!
EDIT: I finally got my app functioning by uninstalling Rails, RVM, Ruby (an RVM version) & Passenger before reinstalling Rails, Passenger & Ruby (but not RVM).