【发布时间】:2013-09-29 10:56:58
【问题描述】:
当我尝试执行“bundle exec rake anything”时,出现错误:
Could not find rake-10.1.0 in any of the sources.
Run `bundle install` to install missing gems.
但是当我执行简单的 'rake anything' 时,rake 正在工作。
当然,我尝试过任何方式设置 gem,我知道:
- 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
这种情况真的很令人沮丧,因为简单的 rake 可以工作,但使用 bundle exec 就不行了。
我需要用 bundle exec
执行 rake真的需要你的帮助!
【问题讨论】:
-
在命令行输入
rvm list会输出什么?你的默认红宝石是哪个? -
你跑
bundle install了吗? -
ruby-2.0.0-p247 - 当前 && 默认
-
我跑了
bundle install -
执行
ruby-2.0.0-p247 -S gem list给出了宝石列表。当我输入ruby-2.0.0-p247 -S bundle exec gem list时,它会再次写入Could not find rake-10.1.0 in any of the sources. Run 'bundle install' to install missing gems.
标签: ruby-on-rails ruby rubygems gem rake