1.
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
[img]http://dl.iteye.com/upload/attachment/0066/4881/bb4e1d16-3992-369a-8a1b-25d743185cb3.jpg[/img]
解决方法:在系统里面安装一个js的运行环境。注意有的源是不行的(sigh!)。
下面是经我测试可以的办法:
参考资料:[url]https://github.com/sstephenson/execjs[/url]
rails server 出现下面的错误Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
[img]http://dl.iteye.com/upload/attachment/0066/4881/bb4e1d16-3992-369a-8a1b-25d743185cb3.jpg[/img]
解决方法:在系统里面安装一个js的运行环境。注意有的源是不行的(sigh!)。
下面是经我测试可以的办法:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs参考资料:[url]https://github.com/sstephenson/execjs[/url]
本文介绍了如何解决Rails项目中因缺少JavaScript运行环境而导致的问题。通过安装Node.js来为Rails提供必要的JS运行支持。
76

被折叠的 条评论
为什么被折叠?



