乘客 + Rails 3.1.1 = 在任何来源中都找不到 rake-0.9.2 (Bundler::GemNotFound) [英] Passenger + Rails 3.1.1 = Could not find rake-0.9.2 in any of the sources (Bundler::GemNotFound)
问题描述
我知道已经有一些关于这个错误的线索,但没有一个能解决我的问题.我使用 rails 3.1.1 和 RVM Ruby 1.9.2-p180 启动了一个新的 rails 应用程序.当我使用 rails server
并转到 localhost:3000
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
但是当我尝试像我的其他 Rails 3.0.x 应用程序一样使用乘客(OSX 首选项窗格)托管它时并在浏览器中访问它我收到以下错误:
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
还有其他人遇到 Rails 3.1.1 和乘客问题吗?
Anybody else experiencing problems with rails 3.1.1 and passenger?
当我输入 gem list --local
时,我的列表中肯定有 rake 0.9.2,而且我也在正确的 RVM gemset 中.
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.
有什么想法吗?
推荐答案
首先检查Passenger是否使用正确的ruby(如果你使用Apache):
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
然后查看RVM +乘客指南.
这篇关于乘客 + Rails 3.1.1 = 在任何来源中都找不到 rake-0.9.2 (Bundler::GemNotFound)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!