rails c命令失败:您的包被锁定到CFPropertyList(2.3.4)如何解决?

时间:2017-01-18 19:15:49

标签: ruby-on-rails bundler

我正在开发我的应用程序,当我尝试运行rails c时,会导致此错误:

Your bundle is locked to CFPropertyList (2.3.4), but that version could not be 
found in any of the sources listed in your Gemfile. If you haven't changed sources, 
that means the author of CFPropertyList (2.3.4) 
has removed it. 
You'll need to update your bundle to a different version of CFPropertyList (2.3.4) 
that hasn't been removed in order to install.

运行bundle install以安装缺少的宝石。

我没有突然造成这个错误的原因,但这似乎只在我运行rails c时出现。所有其他rails命令都能正常工作。我已尝试运行bundle installbundle update,但错误仍然存​​在。有没有人遇到此错误?是否可以简单地删除`Gemfile.lock'中的违规行?

1 个答案:

答案 0 :(得分:1)

删除Gemfile.lock并重新运行bundle install。它将使用适当的依赖项重建。如果您仍然遇到问题,则可能在两个或更多宝石之间存在版本/依赖关系冲突。