Rails-3.2.x new project启动错误:Could not find a JavaScript runtime.

刚刚更新了ruby和rails的版本,发现rails越来越重量级了。。。

rails new project后执行rake db:create出现如下错误及提示:

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

需要在Gemfile中添加两个gem:

gem 'execjs'
gem 'therubyracer'  # Google V8 embedded within Ruby

重新运行rake db:create,通过。

参考:

https://github.com/sstephenson/execjs

posted @ 2012-11-24 08:28  ArronGao  阅读(219)  评论(0编辑  收藏  举报