Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 819
hey mike Avatar asked Mar 12 '12 03:03

hey mike


People also ask

How do I change bundle version?

If you want to upgrade the Bundler version used by your application, you can run bundle update --bundler , and your lockfile will be regenerated using the latest version.

How do I uninstall a gem file?

You must use 'gem uninstall gem_name' to uninstall a gem. Show activity on this post. I seemed to solve this by manually removing the unicorn gem via bundler ("sudo bundler exec gem uninstall unicorn"), then rebundling ("sudo bundle install").


2 Answers

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.

like image 189
mpapis Avatar answered Sep 29 '22 05:09

mpapis


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.

like image 37
dgreen22 Avatar answered Sep 29 '22 04:09

dgreen22