Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undo bundle install --deployment?

I have been working on a rails app and been deploying regularly to heroku using local git depository. I accidentally ran the command:

bundle install --deployment

It seems it downloaded all the gems to the local folder, and now when I want to upload to heroku it is trying to upload many megabytes of gems... How do I undo the command I ran and delete the local gems? How do I prevent bundle install from downloading all gems again?

like image 644
Isaac Y Avatar asked Jan 02 '16 14:01

Isaac Y


1 Answers

Wanted to make this an answer because it was jrochkind comment that helped

rm -rf vendor/bundle

The f in -rf ignores the questions asking if you want to really remove this file.

bundle install --no-deployment

The above will disable bundle deployment mode and install needed packages in a non production enviroment

git add .
git commit -m "fixed deployment bundle"
git push heroku master

The above will add all your lock file to git, create a commit with the new update. It will then send your fixed lock file to your master branch to Heroku master branch (It only has a master) along with any other changes you have done.

If you need to send a different branch to Heroku other than your master then instead of git push heroku master run the following code:

git push heroku development:master

The above command will push your development branch to the Heroku master branch. change development to the branch name you want to send to Heroku.

like image 178
BrinkDaDrink Avatar answered Sep 21 '22 08:09

BrinkDaDrink