繁体   English   中英

rake资产:在Windows 8上的rails 3.2.8中预编译失败

[英]rake assets:precompile failed in rails 3.2.8 on Windows 8

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'

在application.js中只有两个datapicker,它们在启动应用程序时工作正常。 什么可能导致这种失败? 谢谢。

我建议尝试使用rubyracer gem而不是过去经验中的execjs

或者,尝试从Gemfile中注释掉jquery-railsjquery-ui-rails gems,看看这些是否会导致问题。 您始终可以将jqueryjquery-ui直接放入您的资产中。

问题是execjs在Windows 8上不起作用。这是一篇关于如何修复Windows 8的execjs运行时的帖子 。但是这个修复似乎不适用于资产:预编译。 我们可能不得不等待更新windows 8的execjs。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM