我刚刚从 Rails 3.2.10 升级到 3.2.11,并且没有对我的应用程序进行其他更改。
突然之间,我的网站无法加载 - 并给了我错误消息:
ExecJS::RuntimeError in Static_pages#home
有谁知道为什么 Rails 3.2.11 中的更改会导致这个问题?
ExecJS::RuntimeError in Static_pages#home
Showing C:/Sites/av_reports/app/views/layouts/application.html.erb where line #11 raised:
(in C:/Sites/av_reports/app/assets/javascripts/password_resets.js.coffee)
Extracted source (around line #11):
8: <meta name="author" content="">
9:
10: <%= stylesheet_link_tag "application", :media => "all" %>
11: <%= javascript_include_tag "application" %>
12: <%= csrf_meta_tags %>
13: <%= render 'layouts/shim' %>
14: </head>
我的 /app/assets/javascripts/password_resets.js.coffee 文件包含 3 行注释掉的文本,所以我猜这不是问题所在。
宝石依赖性或类似情况是否有变化 - 这可能导致问题?
编辑
我的 application.js 文件内容如下:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require_tree .