Could not find gem ‘XXX (~> X.XX.X)‘ in any of the gem sources listed in your Gemfile.

错误描述:有时候我们用gem安装了某个Gem,但是仍然会报错无法找到这个gem 

rake redmine:send_reminders days=1 users="1" RAILS_ENV="development"
Could not find gem 'capybara (~> 3.25.0)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

解决方法:

首先,执行gem list bundler

yjl@fibocom:/opt/redmine-4.1.1-0/apps/redmine/htdocs$ gem list bundle

*** LOCAL GEMS ***

bundler (2.2.4, default: 1.17.3)
bundler-unload (1.0.2)
rubygems-bundler (1.4.5)

其次,查看项目中Gemfile.lock文件末尾,有一行 ,把这个地方的版本盖上上面的2.2.4,再次执行rake命令,就不会报这个错误了

BUNDLED WITH xx.xx.x

来源:https://stackoverflow.com/questions/54087856/bundler-cant-find-gem-bundler-0-a-with-executable-bundle-gemgemnotfoun 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值