我们最近在我们的项目中将bundler更新为2.0.1。更新后,应用程序运行正常,但我无法运行rspec。它确实在我的同事计算机上运行,这应该与我的设备完全相同。
我尝试了什么:
bundler update --bundler
=>成功完成gem update bundler
=>成功完成bundle exec bin/rspec
=>错误:You must use Bundler 2 or greater with this lockfile.
bin/rspec
=>错误:You must use Bundler 2 or greater with this lockfile.
bundle -v
=> Bundler版本2.0.1bundle exec bundler -v
=> Bundler版本2.0.1bundle exec rake app:update:bin
=>成功完成一些版本:
我认为问题出在我的默认版本的bundler上。你可以用gem list bundler
看到它。
我最终卸载ruby并重新安装它,然后重新安装了bundler 2和所有其他宝石。固定它。
您可以尝试删除Gemfile.lock并运行bundle install
,之后再次尝试运行命令:bundle exec rspec