Skip to content

Instantly share code, notes, and snippets.

@laph
laph / gist:3326247
Created August 11, 2012 18:35
Solving the "Could not find a JavaScript runtime" error (Rails 3.1 deployment with Capistrano 2.12)

Capistrano: Solving the "Could not find a JavaScript runtime" error

Did you ever try to deploy your Rails application with Capistrano but got an error saying "Could not find a JavaScript runtime" like this:

[out :: web.YourServer.com] rake aborted!
[out :: web.YourServer.com] Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

Some people on the web were able to solve this issue by adding therubyracer to their Gemfile (as the linked website in the error message suggests).

gem 'therubyracer'