熱門文章

2016年2月27日 星期六

[Rails]Ruby on Rails RuntimeError 解決

ExecJS::RuntimeError in Drinks#index

Showing /Users/QJpioneer/railsbridge/test_app/app/views/layouts/application.html.erb where line #5raised:
["ok"]
Extracted source (around line #5):
3
4 TestApp
5 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>6 <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7 <%= csrf_meta_tags %>
8
Rails.root: /Users/QJpioneer/railsbridge/test_app
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__2924576156849093825_70238220062660'
Request
Parameters:
None


修改 Gemfile 加上一行 

gem 'therubyracer'

然後輸入 bundle,重開 rails


Gemfile  位置 ~/railsbridge/test_app/Gemfile

沒有留言:

張貼留言