'how to undo bundle update

bundle update and bundle install is ver fantastic. However, is there a good way to undo bundle install and bundle update if something went wrong ?



Solution 1:[1]

There is one obvious way:

git checkout -- Gemfile.lock

and then run

bundle install

It assumes you use git - but who does not now days, I have everything in git.

Solution 2:[2]

I went into Github, copied my old Gemfile.lock that I wanted and pasted it into my Gemfile.lock in my code and then ran bundle install.

Solution 3:[3]

I tried to follow the accepted answer but I was still getting errors. This is what worked for me:

git checkout -- Gemfile.lock

And then:

bundle pristine

As described in the Bundler docs, bundle pristine restores installed gems to their pristine condition.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mic Fok
Solution 2 dgreen22
Solution 3 FlavioEscobar