Question

My heroku deployment is crashing with following errors.

2012-12-12T17:16:18+00:00 app[web.1]: bash: bundle: command not found
2012-12-12T17:16:19+00:00 heroku[web.1]: Process exited with status 127
2012-12-12T17:16:19+00:00 heroku[web.1]: State changed from starting to crashed

The Heroku documentation for this error is to set PATH and GEM variables as described in https://devcenter.heroku.com/articles/changing-ruby-version-breaks-path I tried that, however that too is not helping.

→ heroku config:add PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
→ heroku config:add GEM_PATH=vendor/bundle/ruby/1.9.1
→ heroku run rake db:migrate
Running rake db:migrate attached to terminal... up, run.7130
bash: bundle: command not found

Next, I tried setting Ruby version in my Heroku app. This increased the slugsize. But app was still not up.

Gemfile

ruby "1.9.2"

Pushed to Heroku

-----> Using Ruby version: ruby-1.9.2
-----> Installing dependencies using Bundler version 1.2.2

heroku run "ruby -v"

Running `ruby -v` attached to terminal... up, run.4483
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]

Can someone please advice

Was it helpful?

Solution

The error is because your path is incorrect.

  1. If you're trying to use Ruby 1.9.3 you don't need to do anything, it's the default Ruby so you can remove those config vars.
  2. If you're using 1.8.7 or 1.9.2, then upgrade to 1.9.3 as it's current.
  3. If you're looking at using Ruby 2.0.0.p3 - you're on your own ;)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top