简体   繁体   中英

Passenger + Rails 3.1.1 = Could not find rake-0.9.2 in any of the sources (Bundler::GemNotFound)

I know there are already some threads about this error, but none of them solved my problem. I started a new rails app with rails 3.1.1 and RVM Ruby 1.9.2-p180. It works when I use rails server and go to localhost:3000

But when I try to host it like my other Rails 3.0.x apps using Passenger (OSX pref pane) and visit it in the browser I get the following error:

    Error message:
    Could not find rake-0.9.2 in any of the sources (Bundler::GemNotFound)
    Exception class:
    PhusionPassenger::UnknownError

Anybody else experiencing problems with rails 3.1.1 and passenger?

when I type gem list --local there is definitely rake 0.9.2 in my list, and I am also in the correct RVM gemset.

Any ideas?

First check if Passenger is using correct ruby (if you use Apache):

LoadModule passenger_module /home/user/.rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
PassengerRoot /home/user/.rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.9
PassengerRuby /home/user/.rvm/wrappers/ree-1.8.7-2011.03/ruby

Then check RVM + passenger guide.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM