使用bundle exec找不到rake [英] Could not find rake with bundle exec

查看:144
本文介绍了使用bundle exec找不到rake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试执行' bundle exec rake anything '时,出现错误:

 可能在任何来源找不到rake-10.1.0。 
运行`bundle install`来安装缺失的宝石。

但是当我执行简单的'rake anything'时,rake正在工作。



原因是,我试着用任何方式设置gem,我知道:


  • gem install rake -v = 10.1.0

  • 在Gemfile中写入 gem'rake','10 .1.0',然后执行包安装

  • 我为所有rvm安装了gem: rvm all do gem install rake -v 10.1.0


这种情况非常令人沮丧,因为简单的 rake 起作用,但是使用 bundle exec 不需要。

>

我需要使用 bundle exec执行rake



真的需要您的帮助!

解决方案

我有同样的问题,具有完全相同的错误消息,昨天使用相同的Ruby版本。我通过从我的存储库中的 .bundle / config 删除此行来解决它:

  BUNDLE_DISABLE_SHARED_GEMS:'1'


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.

But when I execute simple 'rake anything', rake is working.

Of cause, I tried setup gem any way, which I know:

  • 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

This situation really frustration, because simple rake works, but with bundle exec doesn't want.

I need execute rake with bundle exec

Really need your help!

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆