[英]Rails: Error running 'bundle' command
I am running bundle install --local
and getting the following error: 我正在运行
bundle install --local
并收到以下错误:
Your bundle is locked to rake (11.2.2), 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 rake (11.2.2) has removed it. You'll need to update your bundle to a different version of rake (11.2.2) that hasn't been removed in order to install.
Unable to decipher as to what needs to be done. 无法判断需要做什么。 Any help would be highly appreciated.
任何帮助将不胜感激。
Try running these commands 尝试运行这些命令
gem install rubygems-bundler
gem regenerate_binstubs
I encountered this problem also while using Jenkins, so here is what helped me: 我在使用Jenkins时也遇到了这个问题,所以这对我有帮助:
First go through console to your job directory: 首先通过控制台进入您的工作目录:
cd /var/lib/jenkins/workspace/<your-job-name>
If you are not sure where Jenkins stores your project, use pwd
command inside your bash script. 如果不确定Jenkins将项目存储在何处,请在bash脚本中使用
pwd
命令。
In this directory, find your Gemfile.lock and delete it 在此目录中,找到您的Gemfile.lock并将其删除
rm Gemfile.lock
then try running bundle as you would usually do from console 然后尝试像通常从控制台那样运行捆绑软件
bundle install
And see your bundle working. 并查看您的捆绑包正常工作。 Hope it helps someone to solve the issue.
希望它可以帮助某人解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.