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

只谈情不闲聊 提交于 2019-12-06 13:14:32

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/7833020/passenger-rails-3-1-1-could-not-find-rake-0-9-2-in-any-of-the-sources-bundl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!