Bundler is ghost-bundling - it uses the gem but passenger returns a GemNotFoundError
I'm using Rails 2.3.11 and Bund开发者_如何转开发ler 1.0.10.
Passenger returns the error
Could not find addressable-2.2.4 in any of the sources (Bundler::GemNotFound)
I installed manually addressable 2.2.4 and I bundled it with gem 'addressable', '2.2.4'
did a bundle install
and bundler says Using addressable (2.2.4)
.
Still there is the error of above.
I'm using Passenger as an Apache2 module. I'm using RVM with Ruby 1.9.2. Passenger runs with 1.8.7. Even switching Ruby to 1.8.7 using RVM doesn't solve the problem.
Along with what Zachary said, that is making sure you have the right gemset selected, be sure to run
bundle install
in the directory of the project. In my case for a Padrino project, once i ran bundle, it worked fine (with that gemset selected).
If you're using RVM there's a good chance your gemset for your project is not synched up.
Try doing
rvm gemset list
If you created a ruby for this project and a gemset for it, it will be listed there. Do
rvm gemset use nameOfGemsetForYourProject
RVM is a great tool, but it can muddy the waters and cause some confusion with making sure you're installing a gem under the correct namespace.
To check what gems are installed for a gemset, after you have done a 'use' on it, just type "gem list"
精彩评论