Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundle exec with heroku - is it necessary?

I recently set up a Cedar (Rails 3.1) app on Heroku, and to run, for example, a migration, you'd do

heroku run rake db:migrate

I learned that it's good practice to use "bundle exec" before any rake command (as Katz says http://yehudakatz.com/). So, I thought perhaps the following is actually better practice:

heroku run bundle exec rake db:migrate

But to reduce verbosity, is it alright to use the former command, or is the one with bundle exec critical?

like image 887
dmonopoly Avatar asked Jul 24 '11 17:07

dmonopoly


Video Answer


1 Answers

On Heroku when the slug is compiled the Gems are installed from into a clean slug as specified in your Gemfile so there's not going to be extraneous Gems floating around the place - there's no need to use bundle exec on Heroku - else I'm sure the Heroku documentation would tell you to do it.

like image 187
John Beynon Avatar answered Oct 24 '22 22:10

John Beynon