Why there is no “heroku bundle update”?

2019-04-08 00:36发布

问题:

I don't understand why i have to update my gems localy and push it to heroku, to get the updated version of them?

why there is no heroku bundle update command?

回答1:

When you bundle update or run any of the equivalent CLI commands, I believe Bundler updates your Gemfile.lock file - which keeps a tree of all your gem dependencies - and the lock file is tracked by your git repository (see here for more info).

If you were able to run the command directly on Heroku, then you'd have to pull your repository again, otherwise you'd have a git fast-forward issue on your hands.

So really, you're not running any more commands by having to do it locally and push it back up.



回答2:

The real reason why should run bundle update localy first is to test if your application is still working with the newer gem version. heroku bundle update would be a dangerous command.