Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku: 'bundle command not found' under Ruby 2.0.0

I have a Rails 3.2.3 app that I'm trying to push to Heroku using Ruby 2.0.0preview1 (see: http://blog.heroku.com/archives/2012/11/5/ruby-2-preview-on-heroku/).

This is an application that has been functioning properly under Ruby 1.9 and should have no issues under Ruby 2.0.0.

The errors I'm encountering are:

2012-11-07T15:19:32+00:00 heroku[web.1]: State changed from crashed to starting
2012-11-07T15:19:37+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 3225 -c ./config/unicorn.rb`
2012-11-07T15:19:38+00:00 app[web.1]: bash: bundle: command not found
2012-11-07T15:19:39+00:00 heroku[web.1]: Process exited with status 127
2012-11-07T15:19:39+00:00 heroku[web.1]: State changed from starting to crashed

I logged into Heroku via bash and installed Bundler (gem install bundler) but that didn't help. I also tried changing the GEM_PATH environment variable but that doesn't seem to do anything either.

I'm racking my brain on how to fix this one. Any help is appreciated!

like image 990
cobrabyte Avatar asked Nov 07 '12 15:11

cobrabyte


1 Answers

I had the same thing: solved it by creating a new Heroku app with Ruby 2.0.0 and looking at the output of "heroku config" of my app vs the new app. Then I noticed that both GEM_PATH and PATH were different, so I did:

$ heroku config:set GEM_PATH=vendor/bundle/ruby/2.0.0
$ heroku config:set PATH=bin:vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin

And presto, error's gone!

(got the idea from: heroku: bash: bundle: command not found)

like image 92
Tom De Leu Avatar answered Oct 24 '22 23:10

Tom De Leu