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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With