Ruby:在任何来源中都找不到rake-0.9.2 [英] Ruby: Could not find rake-0.9.2 in any of the sources
问题描述
注意:由于忽略了Aptana标签,因此我重新标记了此问题.在Aptana Studio 3中选择运行服务器"时发生错误.Aptana尝试执行脚本/路轨服务器,这将导致以下错误.
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)
当宝石列表清楚地显示宝石在那里时,我怎么能收到此错误?
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中要求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屋!