Ruby on rails 找不到具有bundle exec的rake
当我尝试执行“bundle exec rake anything”时,出现错误:Ruby on rails 找不到具有bundle exec的rake,ruby-on-rails,ruby,rubygems,gem,rake,Ruby On Rails,Ruby,Rubygems,Gem,Rake,当我尝试执行“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安装rake-v=10.1.0 在Gemfile中写入“gem'rake',10.1.0',然后执行bundle安
Could not find rake-10.1.0 in any of the sources.
Run `bundle install` to install missing gems.
但当我执行简单的“rake anything”时,rake是有效的
当然,我尝试过任何方法,我知道:
- gem安装rake-v=10.1.0
- 在Gemfile中写入“gem'rake',10.1.0',然后执行bundle安装
- 我为所有rvm安装了gem:rvm all do gem安装rake-v 10.1.0
真的需要你的帮助 我昨天遇到了同样的问题,错误消息完全相同,使用的是相同的Ruby版本。我通过从我的存储库中的
.bundle/config
中删除这一行解决了这个问题:
BUNDLE_DISABLE_SHARED_GEMS: '1'
我在一个由OpsWorks管理的AWS实例中遇到了这个问题。我是以ec2user身份登录的。我通过
sudo su-deploy
切换到部署用户并再次运行bundle命令,该命令完成时没有出现错误当我尝试运行“bundle exec$EXECUTABLE”而没有首先运行“bundle install”时,我遇到了类似的错误:|我有同样的问题,我的解决方案是:
删除我的gemfile.lock
rm Gemfile.lock
不要在我的档案里翻找
gem 'rake', '10.0.2'
最后
bundle install
在命令行上键入
rvm list
时输出什么?哪个是您的默认ruby?您是否运行了bundle安装
?ruby-2.0.0-p247-当前和&defaulti运行了bundle安装
执行ruby-2.0.0-p247-S gem list
给出了gem列表。当我键入ruby-2.0.0-p247-S bundle exec gem list
时,它再次写入在任何源代码中都找不到rake-10.1.0。运行“bundle install”安装缺少的gems。
bundle/config在哪里?您不确定,我的位于Rails项目根目录中。我想这取决于具体的配置。