user938363
user938363

Reputation: 10378

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:

** 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. What could cause this failure? Thanks.

Upvotes: 1

Views: 777

Answers (2)

user938363
user938363

Reputation: 10378

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. We may have to wait for update of execjs for windows 8.

Upvotes: 1

mccannf
mccannf

Reputation: 16659

I would recommend trying the rubyracer gem instead of execjs from past experience.

Alternatively, try commenting out jquery-rails or jquery-ui-rails gems from your Gemfile to see if these are causing you problems. You can always put jquery and jquery-ui directly into your assets.

Upvotes: 3

Related Questions