Reputation: 10862
I've taken over ann application that was deployed to a server by someone else. There's something broken about the setup, some missing environment variable or similar problem but I am stumped. By the way this is obviously a Rails application, running under REE and mod_rails (passenger)
$ rake db:migrate
(in /var/www/ems.trustthevote.org/ems/current)
Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your
RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
$ bundle list
Gems included by the bundle:
[...snip]
* actionmailer (2.3.8)
* actionpack (2.3.8)
* activerecord (2.3.8)
* activeresource (2.3.8)
* activesupport (2.3.8)
[...snip...]
* rails (2.3.8)
$ gem list rails
*** LOCAL GEMS ***
RUBYOPT=-rauto_gem
RUBYLIB=~/.gem
And finally, here's what Ruby thinks:
$ irb
irb(main):001:0> $:
=> ["~/.gem", "/usr/lib64/rubyee/site_ruby/1.8",
"/usr/lib64/rubyee/site_ruby/1.8/x86_64-linux", "/usr/lib64/rubyee/site_ruby",
"/usr/lib64/rubyee/vendor_ruby/1.8", "/usr/lib64/rubyee/vendor_ruby/1.8/x86_64-linux",
"/usr/lib64/rubyee/vendor_ruby", "/usr/lib64/rubyee/1.8", "/usr/lib64/rubyee/1.8/x86_64
linux", "."]
irb(main):002:0>
My eyes are crossed. What am I missing?
Upvotes: 2
Views: 1558
Reputation: 549
When using a custom bundle path, make sure that you run rake commands within the bundler environment.
bundle exec rake db:migrate
Try that out.
Upvotes: 1
Reputation: 176392
Bundler installs the gem in a custom directory. This is the reason why the result of gem list
won't show them.
Unfortunately, I'm not sure why the command $ rake db:migrate
doesn't find your gems.
Upvotes: 0