为什么我会收到此乘客错误无法在任何来源中找到 rake-0.9.2.2? [英] Why am I getting this Passenger error Could not find rake-0.9.2.2 in any of the sources?

查看:22
本文介绍了为什么我会收到此乘客错误无法在任何来源中找到 rake-0.9.2.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个新的空 Rails 应用程序,它几乎是空的.我创建它只是为了尝试查明问题,但出现以下错误.

I just created a new empty Rails app, it's almost empty. I created it just to try to pinpoint the problem, but I'm getting the following error.

我使用的是 Rails 3.1.0 和 Ruby 1.9.2

I'm using Rails 3.1.0 and 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

所以我将 rake-0.9.2.2 添加到 Gemfile 并运行 bundle,但我仍然收到相同的错误消息.

So I added rake-0.9.2.2 to the Gemfile and ran bundle and I'm still getting the same error message.

我不知道问题出在哪里,我什至尝试打开 rails 日志文件,但里面什么也没有.

I have no idea what the problem is, I have even tried to open the rails log files but there is nothing in there.

我尝试了很多次以不同的方式修复错误,但似乎没有任何效果.

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.

添加详细信息

我尝试打包宝石,现在我得到了这个

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

注意 bundler gem 和其他 gem 之间的区别.

Notice the difference between bundler gem and the other ones.

推荐答案

我修复了将 gem 打包到供应商/捆绑包时的相同错误,如下所示:

I fixed the same error doing packing the gems into vendor/bundle like this:

从您的应用目录中:

$ bundle install --path vendor/bundle  

试一试,告诉我这对你是否有效.

Give a shot and tell me if that works to you.

这篇关于为什么我会收到此乘客错误无法在任何来源中找到 rake-0.9.2.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆