After starting the Rails server in a freshly generated Rails 3.1 project you could see an error message such as
/usr/lib/ruby/gems/1.8/gems/execjs-1.3.0/lib/execjs/runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
Just add a JavaScript runtime to your Gemfile and the error vanishes.
Examples:
gem 'therubyracer'
gem 'extjs'
Posted to makandra dev (2011-10-29 08:46)