Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running ruby 1.9.2 on Heroku

I'm trying to create a new app on heroku but it seems no matter what I do heroku runs ruby 1.9.1 rather than 1.9.2

I've created my app...

heroku create writings --stack cedar

Then I've pushed my develop branch to master on heroku for testing

git push heroku develop:master

But the app runs with errors... looking in the heroku logs.. this seems to be the offending error.

 /app/vendor/bundle/ruby/1.9.1/gems/execjs-1.1.3/lib/execjs/runtimes.rb:43:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

Which shows that it's running ruby 1.9.1 does it not?

If I run heroku config it shows...

heroku config
DATABASE_URL        => postgres://mxlvaczibv:[email protected]/mxlvaczibv
GEM_PATH            => vendor/bundle/ruby/1.9.1
LANG                => en_US.UTF-8
PATH                => vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
RACK_ENV            => production
RAILS_ENV           => production
SHARED_DATABASE_URL => postgres://mxlvaczibv:[email protected]/mxlvaczibv

Is this not showing it is running 1.9.1? I'm totally confused... I thought the cedar stack ran 1.9.2. Any help appreciated.

Thanks, mark.

like image 828
markstewie Avatar asked Jun 18 '11 23:06

markstewie


1 Answers

It does not show that it is running Ruby 1.9.1. Because the standard library changed very little between 1.9.1 and 1.9.2, the same path is used for both of them. You will notice this is not just on Heroku.

It looks like execjs is expecting to have a JS runtime installed on the system. Apparently Celadon Cedar does have one (NodeJS), but it won't work until rails 3.1rc5 arrives. Until then, follow the intructions in this answer.

like image 87
coreyward Avatar answered Sep 25 '22 02:09

coreyward