簡體   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