Possible to get Rails 4 working on Windows?

前端 未结 5 972
借酒劲吻你
借酒劲吻你 2020-12-15 10:32

I\'m working on a Rails 4 (using the release candidate) project and now need to collaborate with someone on a Windows machine. I can\'t even get a basic webpage to come up,

5条回答
  •  無奈伤痛
    2020-12-15 10:54

    Just install node.js and the problem will gone.

    Explanation: If you'll try to precompile assets, you'll get the following trace:

    (in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/turbolinks-1.3.0/lib/assets/javascripts/turbolinks.js.coffee)
    C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:142:in `exec_runtime'
    C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:28:in `block in exec'
    C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
    ...
    

    As you can see, there is a problem with ExecJS. ExecJS lets you run JavaScript code from Ruby and it requires one of the JS interpreters to be installed on your system. Here's a list of supported interpreters. Usually, you can use therubyracer which is just V8 but there are problems with compiling V8 under the windows. So you can choose another option - NodeJS. ExecJS will use it automatically when you'll install NodeJS and add it to your PATH.

提交回复
热议问题