[英]Why am I getting this Passenger error Could not find rake-0.9.2.2 in any of the sources?
I just created a new empty Rails app, it's almost empty. 我刚刚创建了一个新的空Rails应用程序,它几乎是空的。 I created it just to try to pinpoint the problem, but I'm getting the following error.
我创建它只是为了试图找出问题,但我收到以下错误。
I'm using Rails 3.1.0 and Ruby 1.9.2 我正在使用Rails 3.1.0和Ruby 1.9.2
Error message:
Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
Exception class:
PhusionPassenger::UnknownError
So I added rake-0.9.2.2 to the Gemfile and ran bundle and I'm still getting the same error message. 所以我将rake-0.9.2.2添加到Gemfile并运行bundle,我仍然收到相同的错误消息。
I have no idea what the problem is, I have even tried to open the rails log files but there is nothing in there. 我不知道问题是什么,我甚至试图打开rails日志文件,但那里什么都没有。
I have tried many times to fix the error in different ways but nothing seems to work. 我已经多次尝试以不同的方式修复错误,但似乎没有任何工作。
I'm thinking it could also have to do with something about the asset pipeline. 我认为它也可能与资产管道有关。
ADDED DETAILS 添加细节
I tried packing the gems and now I got this 我试着打包宝石,现在我明白了
bundle show mysql2
/releases/20111117205618/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.10
bundle show rails
/releases/20111117205618/vendor/bundle/ruby/1.9.1/gems/rails-3.1.0
bundle show bundler
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21
Notice the difference between bundler gem and the other ones. 注意bundler gem和其他gem之间的区别。
I fixed the same error doing packing the gems into vendor/bundle like this: 我修复了同样的错误,将gems打包到vendor / bundle中,如下所示:
From inside your app directory: 从您的app目录中:
$ bundle install --path vendor/bundle
Give a shot and tell me if that works to you. 试一试并告诉我这是否适合你。
也有这个问题,按照这里的说明修复: http : //blog.ninjahideout.com/posts/the-path-to-better-rvm-and-passenger-integration
I had the same problem 'Could not find rake-0.9.2.2 in any of the sources' and found that my PATH did not include /usr/local/bin. 我有同样的问题'找不到任何来源的rake-0.9.2.2',发现我的PATH没有包含/ usr / local / bin。 After updating the PATH, it worked.
更新PATH后,它工作正常。
I think the best answer/solution here is to add the following to your deploy.rb
file (assuming Capistrano): 我认为这里最好的答案/解决方案是将以下内容添加到
deploy.rb
文件中(假设为Capistrano):
bundle install --deployment
You can also read the full article and on other deployment engines . 您还可以阅读完整的文章和其他部署引擎 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.