ruby-on-rails – 您的软件包已锁定到rake(12.0.0),但在Gemfile中列出的任何源代码中都找不到该版本.

启动rails服务器时收到以下错误消息:

Your bundle is locked to rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven’t changed sources, that means the author of rake (12.0.0) has removed it. You’ll need to update your bundle to a different version of rake (12.0.0) that hasn’t been removed in order to install.

我在gemfile中指定了gem’rake’,’12 .0.0′,但是没有修复它.我尝试了捆绑更新rake,删除了Gemfile.lock并使用bundle exec bundle install生成它.我还在我的命令中添加了`bundle exec1,它什么也没做.

我的Gemfile.lock已经指定了rake版本12.0.0,并且没有安装其他版本.

看我的gemfile:
http://pastebin.com/L4tVFWz9

和rakefile:
http://pastebin.com/K7p2ajsE

我尝试了Already activated rake version different than what Gemfile requires prevents rake commands中建议的解决方案

最佳答案
解决这个问题的方法不同,

步骤1:

gem install rubygems-bundler
gem regenerate_binstubs

第2步:

删除vendor / bundle目录.

运行bundle install以重建它

第三步:

试试,gem update bundler

Here is a link where the issue got solved. Check this is very useful

转载注明原文:ruby-on-rails – 您的软件包已锁定到rake(12.0.0),但在Gemfile中列出的任何源代码中都找不到该版本. - 代码日志