首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rails:无法在任何源中找到rake-10.1.1

Rails:无法在任何源中找到rake-10.1.1
EN

Stack Overflow用户
提问于 2014-02-06 01:02:45
回答 2查看 6K关注 0票数 4

我在运行Rake命令时遇到了错误。当我试图在我的Rails项目中加入时,我会得到一个错误,上面写着Could not find rake-10.1.1 in any of the sources

我把Rake10.1.1放在我的Gemfile中,但是当我捆绑安装时,它似乎什么也不做。

我已经尝试卸载,然后在我的计算机的Ruby,RVM Ruby-2.1.0,RVM Ruby-2.1.0@全局,以及我为特定项目创建的RVM gem中安装Rake gem。我也尝试过删除Gemfile.lock,然后捆绑安装。

我尝试在多个不同的Ruby/gems文件(包括RVM )中手动从终端中运行rake。它给出了这个错误:

/Users/me/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/bin/rake ; exit; ~ me$ /Users/me/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/bin/rake ; exit; rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

我在我的项目中有一个Rakefile,并且尝试重命名它(Rakefile.rb,rakefile)。

当我运行Rake命令(如rake db:migrate )时,会得到以下错误:

拉克流产了!未定义的局部变量或方法在require‘/Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in load_dependency' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:inload_dependency' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in/me/..rvm/gems/ruby-2中的config' for main:Object /Users/me/RailsProject/config/environment.rb:4:inrequire' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in块.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in require_environment!' /Users/me/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:in块在run_tasks_blocks‘/Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in eval' /Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in’任务中: TOP => db:migrate =>环境(参见使用-跟踪运行任务的完整跟踪)

在来到这里之前,我到处寻找解决办法,但我找不到。如果有人能在这个问题上给我一些建议,我将不胜感激。提前谢谢你。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-03-06 01:35:24

我不知道问题是什么,但我解决了它,通过创建一个新的宝石集,安装Rake,并使用它。我也从鲁比明转到了崇高。可能是Rubymine试图使用不同的宝石。小心那些IDE设置。

票数 0
EN

Stack Overflow用户

发布于 2014-02-06 01:27:05

看起来它很难找到依赖项。您用gem install rake在系统上安装了rake吗?如果不是,您将需要使用bundle exec rake

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21591985

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档