Rails 3.1 execjs and Could not find a JavaScript runtime

今天用rails3.1 生成一个新的项目, 遇到:

Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)


google一下,在gem 中添加:
gem 'execjs'
gem 'therubyracer'

然后bundle install, 搞定

你可能感兴趣的:(JavaScript)