Ruby:在任何来源中都找不到 rake-0.9.2 [英] Ruby: Could not find rake-0.9.2 in any of the sources
问题描述
注意:我重新标记了这个问题,因为我忽略了包含 Aptana 标签.在 Aptana Studio 3 中选择运行服务器"时出现错误.Aptana 尝试执行脚本/rails 服务器,导致以下错误.
Note: I retagged this question since I neglected to include the Aptana tag. The error occurs when choosing "run server" in Aptana Studio 3. Aptana tries to execute script/rails server, which results in the error below.
也许 Aptana 专家可以回答?
Perhaps an Aptana guru can answer?
在我发现的所有类似问题中,我已经浏览并尝试了建议的解决方案.大多数问题都没有被接受的答案.
I've looked through and tried the suggested solutions in all the similar questions I found. Most of the questions did not have an accepted answer.
我已经开始了一个新的 Rails 项目来开始教程,当我尝试运行服务器时,我得到了臭名昭著的:
I've started a fresh Rails project to start on a tutorial, and when I try to run the server, I get the infamous:
在任何来源中都找不到 rake-0.9.2
Could not find rake-0.9.2 in any of the sources
但是,宝石列表显示:
耙子 (0.9.2, 0.8.7)
rake (0.9.2, 0.8.7)
当 gem list 清楚地显示 gem 存在时,我怎么会收到这个错误?
How can I be receiving this error when gem list clearly shows the gem is there?
我该如何调试和解决这个问题?
How can I debug and resolve this issue?
我的 gemfile 是:
My gemfile is:
gem 'rails', '3.0.4'
gem 'sqlite3'
gem 'sqlite3-ruby', :require =>'sqlite3'
推荐答案
你需要在你的 Gemfile 中 require rake gem
You need to require rake gem in your Gemfile
gem 'rails', '3.0.4'
gem 'sqlite3'
gem 'sqlite3-ruby', :require =>'sqlite3'
gem 'rake', '0.9.2'
现在运行 bundle install
确保您已连接到互联网.现在如果你想执行 rake 任务然后使用 bundle exec rake task_name
now run bundle install
make sure you are connected with internet.
now if you want to execute rake tasks then use bundle exec rake task_name
这篇关于Ruby:在任何来源中都找不到 rake-0.9.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!