【问题标题】:ExecJS::RuntimeError while implementing Angular Js in Rails在 Rails 中实现 Angular Js 时出现 ExecJS::RuntimeError
【发布时间】:2016-11-08 10:33:58
【问题描述】:

我正在尝试在 Rails 项目中实现 Angular Js,我正在关注本教程 http://angular-rails.com/bootstrap.html,在完成所有步骤后我收到此错误:

我已经在网上搜索过这个但没有得到足够的信息,有人提到这是由于 node.js,但我已经在我的系统上安装了 node.js。

【问题讨论】:

    标签: javascript ruby-on-rails angularjs node.js twitter-bootstrap


    【解决方案1】:

    所以我终于找到了solution。

    问题出在我的咖啡脚本上,缺少括号,

    controllers = angular.module('controllers',[])
    controllers.controller("RecipesController", [ '$scope',
      ($scope)->
    ]
    
    上述脚本中缺少

    “)”。

    感谢reference。

    【讨论】:

      【解决方案2】:

      添加gem 'therubyracer'

      然后,执行bundle install

      【讨论】:

      • 还是同样的问题 :(
      • 试试 sudo apt-get install nodejs
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-10
      • 2012-05-05
      • 2012-01-11
      • 2015-08-11
      • 2016-08-19
      • 1970-01-01
      • 2017-06-12
      相关资源
      最近更新 更多