错误描述:有时候我们用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