问题描述
启动Rails服务器时收到以下错误消息:
I get the following error message when starting the rails server:
我在gemfile中指定了gem 'rake', '12.0.0'
,但这并不能解决问题.我尝试了bundle update rake
,删除了Gemfile.lock
并用bundle exec bundle install
生成了它.我还在命令und1之前捆绑了exec1,它什么都不做.
I specified gem 'rake', '12.0.0'
in the gemfile but that doesn't fix it. I tried bundle update rake
, deleting the Gemfile.lock
and generating it with bundle exec bundle install
. I also prepended `bundle exec1 to al my commands which does nothing.
我的Gemfile.lock已经指定了rake版本12.0.0,并且没有安装其他版本.
My Gemfile.lock already specifies rake version 12.0.0, and there are no other versions installed.
查看我的gemfile: http://pastebin.com/L4tVFWz9
See my gemfile:http://pastebin.com/L4tVFWz9
和rakefile: http://pastebin.com/K7p2ajsE
And rakefile:http://pastebin.com/K7p2ajsE
我尝试了中建议的解决方案激活的rake版本与Gemfile要求的版本不同,可以阻止rake命令
推荐答案
解决此问题的不同方法,
Different methods to solve this issue,
第一步:
gem install rubygems-bundler
gem regenerate_binstubs
第二步:
删除供应商/捆绑目录.
Remove the vendor/bundle directory.
运行bundle install
进行重建
第3步:
尝试,gem update bundler
这篇关于您的捆绑软件已锁定为耙(12.0.0),但是在Gemfile中列出的任何来源中都找不到该版本.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!