无法使用 bundle exec 找到 rake [英] Could not find rake with bundle exec
本文介绍了无法使用 bundle exec 找到 rake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试执行bundle exec rake anything"时,出现错误:
When I try execute 'bundle exec rake anything', I get error:
Could not find rake-10.1.0 in any of the sources.
Run `bundle install` to install missing gems.
但是当我执行简单的 'rake anything' 时,rake 正在工作.
But when I execute simple 'rake anything', rake is working.
当然,我尝试过任何方式设置 gem,我知道:
Of cause, I tried setup gem any way, which I know:
- gem install rake -v=10.1.0
- 在Gemfile中写gem 'rake', '10.1.0'",然后执行bundle install
- 我为所有 rvm 安装了 gem:rvm all do gem install rake -v 10.1.0
- gem install rake -v=10.1.0
- Wrote "gem 'rake', '10.1.0'" in Gemfile, then execute bundle install
- I installed gem for all rvm: rvm all do gem install rake -v 10.1.0
这种情况真的很令人沮丧,因为简单的 rake 可以工作,但使用 bundle exec 就不行了.
This situation really frustration, because simple rake works, but with bundle exec doesn't want.
我需要用 bundle exec
真的需要你的帮助!
推荐答案
我昨天遇到了同样的问题,错误消息完全相同,Ruby 版本相同.我通过从我的存储库中的 .bundle/config
中删除这一行来解决它:
I had the same issue, with exactly the same error message, with the same Ruby version yesterday. I solved it by removing this line from .bundle/config
in my repository:
BUNDLE_DISABLE_SHARED_GEMS: '1'
这篇关于无法使用 bundle exec 找到 rake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文