简体   繁体   English

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

[英]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-railsjquery-ui-rails gems,看看这些是否会导致问题。 You can always put jquery and jquery-ui directly into your assets. 您始终可以将jqueryjquery-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.

相关问题 不预编译某些资产 - Rails - Not precompile on certain assets - Rails “rake assets:precompile”的糟糕时间表现 - Poor time performance of 'rake assets:precompile' Rails 4资产管道:config.assets.precompile和有条件的javascript - Rails 4 asset pipeline: config.assets.precompile & conditional javascript 由于 Uglifier Punc 错误,无法预编译 Rails 资产 - Can't Precompile Rails Assets Due to Uglifier Punc Error ExecJS::ProgramError: 运行 rake 资产时出现意外的标记 punc «(»,预期的 punc «:»:在生产中预编译 - ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production 在我运行 rails assets:precompile 之前,Rails 应用程序不会加载对 Javascript 文件的更新 - Rails app doesn't load updates to Javascript files until I run rails assets:precompile 资产错误:由于ckeditor资产而预编译 - Error on assets:precompile because of ckeditor assets 未定义方法预编译资产错误 - Precompile Assets Error By Undefined Method ExecJS :: ProgramError:尝试为生产预编译资产时出现意外字符&#39;#&#39; - ExecJS::ProgramError: Unexpected character '#' when trying to precompile assets for production 资产期间出错:由于Javascript函数默认参数而预编译 - Error during assets:precompile because of Javascript function default argument
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM