[英]rake assets:precompile failed in rails 3.2.8 on Windows 8
When bundle exec rake assets:precompile
in our rails 3.2.8 app, it failed with the errors: bundle exec rake assets:precompile
在我们的rails 3.2.8应用程序中bundle exec rake assets:precompile
时,它失败并出现错误:
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
(in c:/D/code/rails_proj/biz-tools/app/assets/javascripts/application.js)
c:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:142:in `exec_runtime'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:28:in `block in exec'
........... ...........
c:/Ruby193/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [c:/Ruby193/bin/ruby.exe c:/Ruby193/bin/rak...]
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
There are only two datapicker in application.js and they are working fine when firing up the app. 在application.js中只有两个datapicker,它们在启动应用程序时工作正常。 What could cause this failure? 什么可能导致这种失败? Thanks. 谢谢。
I would recommend trying the rubyracer
gem instead of execjs
from past experience. 我建议尝试使用rubyracer
gem而不是过去经验中的execjs
。
Alternatively, try commenting out jquery-rails
or jquery-ui-rails
gems from your Gemfile to see if these are causing you problems. 或者,尝试从Gemfile中注释掉jquery-rails
或jquery-ui-rails
gems,看看这些是否会导致问题。 You can always put jquery
and jquery-ui
directly into your assets. 您始终可以将jquery
和jquery-ui
直接放入您的资产中。
The problem is that execjs does not work on windows 8. Here is a post about how to fix execjs runtimes for windows 8. But this fix seems not working for assets:precompile. 问题是execjs在Windows 8上不起作用。这是一篇关于如何修复Windows 8的execjs运行时的帖子 。但是这个修复似乎不适用于资产:预编译。 We may have to wait for update of execjs for windows 8. 我们可能不得不等待更新windows 8的execjs。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.