首先,我还在忙于学习 RoR,所以我的理解有限。我创建了一个新的简单项目并生成了我的第一个名为“Person”的脚手架。当我启动我的 WEBrick 服务器时,我去 localhost:3000/people 我得到以下运行时错误:
People#index 中的 ExecJS::RuntimeError 显示 C:/Users/Dean/Desktop/guestbook/app/views/layouts/application.html.erb 其中第 6 行提出:(在 C:/Users/Dean/Desktop/guestbook/ app/assets/javascripts/ people.js.coffee)提取的源代码(在第 6 行附近):
3: <head>
4: <title>Guestbook</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
如果需要更多说明,请告诉我,我很乐意更新我的问题。我不是专家,但看起来这与..咖啡脚本宝石有关?我真的只是在这里吐痰......提前谢谢!
people.js.coffee:
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/