Rails跟Win8的兼容性问题

Rails跟Win8的兼容性问题

异常如下:

ExecJS::RuntimeError in Home#index

Showing C:/Users/esdcvsec/blog/app/views/layouts/application.html.erb where line #6 raised:

(in C:/Users/esdcvsec/blog/app/assets/javascripts/home.js.coffee)

Extracted source (around line #6):
3:
4:   Blog
5:   <%= stylesheet_link_tag    "application", :media => "all" %>
6:   <%= javascript_include_tag "application" %>
7:   <%= csrf_meta_tags %>

解决方案:

参照路径:C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\execjs-1.4.0\lib\execjs

修改execjs gem 路径下 execjs\runtimes.rb

JScript = ExternalRuntime.new(
    :name => "JScript",
    :command => "cscript //E:jscript //Nologo //U",
    :runner_path => ExecJS.root + "/support/jscript_runner.js",
    :encoding => 'UTF-16LE')

改成

JScript = ExternalRuntime.new(
  :name        => "JScript",
  :command     => "cscript //E:jscript //Nologo",
  :runner_path => ExecJS.root + "/support/jscript_runner.js",
   :encoding    => 'UTF-8')




你可能感兴趣的:(Rails跟Win8的兼容性问题)