1

I am running bundle install --local and getting the following error:

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.

3
  • Please Let me know the output of this command bundle show | grep rack Commented Sep 27, 2016 at 10:54
  • Actually we are running this in jenkins job and it is failing at this juncture. Commented Sep 27, 2016 at 10:55
  • Please try this in script bundle update rack. Commented Sep 27, 2016 at 11:30

2 Answers 2

4

Try running these commands

gem install rubygems-bundler
gem regenerate_binstubs
Sign up to request clarification or add additional context in comments.

1 Comment

I don't know what this is supposed to do, but it does not work. The simple solution is to delete the Gemfile.lock and then run bundle install to regenerate it again.
1

I encountered this problem also while using Jenkins, so here is what helped me:

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.

In this directory, find your Gemfile.lock and delete it

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.

1 Comment

This doesn't guarantee the same gem versions are installed which were specified in the Gemfile.lock, so Jenkins might behave differently than your local environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.