6

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?

antpaw
  • 15,444
  • 11
  • 59
  • 88

2 Answers2

10

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.

Community
  • 1
  • 1
theTRON
  • 9,608
  • 2
  • 32
  • 46
  • good point, but i still don't like it, its a complex project and i have to do many things before i get the server running and compiling the .lockfile again. – antpaw Mar 14 '11 at 09:28
  • 4
    Maybe there's a way to refine your deploy procedure a little? I know with some of our more complex apps, I'm generally inclined to write a rake task, something like `rake app:deploy`. Which would run through the pre-deploy tasks, run tests and (if passed) then push to heroku. – theTRON Mar 14 '11 at 09:41
3

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.

Heinrich
  • 546
  • 4
  • 4