Content
Installation on Windows Issue > Assets Precompile *rake aborted*
Added by Bruno Carozza over 10 years ago
Hi,
Going through the Windows installation guide for Openproject and can get everything working fine up to the DEV environment working and accessible through http://localhost:3000.
The issue is when i want to have the production instance working and i run the command “bundle exec rake assets:precompile —trace”
I then get a “Rake aborted”.
Here is the full trace:
C:\Sites\openproject>bundle exec rake assets:precompile —trace
require ‘rails/all’… 2.984s
Bundler.require… ***** WARNING: You must use ANSICON 1.31 or higher (https://git
hub.com/adoxa/ansicon/) to get coloured output on Windows
30.360s
**** Invoke assets:precompile (first_time)
**** Execute assets:precompile
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe C:/RailsInstaller/Ruby1.9.3/bin/rake as
sets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets —trace
require ‘rails/all’… 2.953s
Bundler.require… 7.093s
***** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
**** Invoke assets:precompile:all (first_time)
**** Execute assets:precompile:all
**** Invoke assets:precompile:primary (first_time)
**** Invoke assets:environment (first_time)
**** Execute assets:environment
**** Invoke environment (first_time)
**** Execute environment
Application.initialize!… [deprecated] I18n.enforce_available_locales will defa
ult to true in the future. If you really want to skip validation of your locale
you can set I18n.enforce_available_locales = false to avoid this message.
16.110s
**** Invoke tmp:cache:clear (first_time)
**** Execute tmp:cache:clear
**** Execute assets:precompile:primary
rake aborted!
(in C:/Sites/openproject/app/assets/javascripts/accessibility.js)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/ext
ernal_runtime.rb:142:in `exec_runtime’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/ext
ernal_runtime.rb:28:in `block in exec’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/ext
ernal_runtime.rb:41:in `compile_to_tempfile’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/ext
ernal_runtime.rb:27:in `exec’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/uglifier-2.1.1/lib/uglifier
.rb:176:in `really_compile’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/uglifier-2.1.1/lib/uglifier
.rb:100:in `compile’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/compressors.rb:74:in `compress’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/processing.rb:265:in `block in js_compressor=’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/processor.rb:29:in `call’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/processor.rb:29:in `evaluate’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/tilt-1.4.1/lib/tilt/templat
e.rb:103:in `render’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/context.rb:193:in `block in evaluate’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/context.rb:190:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/context.rb:190:in `evaluate’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/bundled_asset.rb:26:in `initialize’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:252:in `new’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:252:in `build_asset’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/index.rb:93:in `block in build_asset’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/caching.rb:19:in `cache_asset’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/index.rb:92:in `build_asset’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:169:in `find_asset’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/index.rb:60:in `find_asset’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/static_compiler.rb:19:in `block in compile’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:219:in `block in each_logical_path’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:206:in `block (2 levels) in each_file’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:196:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:196:in `each_entry’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:204:in `block in each_file’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:203:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:203:in `each_file’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprocke
ts/base.rb:217:in `each_logical_path’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/static_compiler.rb:18:in `compile’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/assets.rake:56:in `internal_precompile’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/assets.rake:70:in `block (3 levels) in <top (required)>’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:236:in `call’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:236:in `block in execute’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:231:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:231:in `execute’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:175:in `block in invoke_with_call_chain’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:168:in `invoke_with_call_chain’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:161:in `invoke’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/assets.rake:60:in `block (3 levels) in <top (required)>’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:236:in `call’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:236:in `block in execute’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:231:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:231:in `execute’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:175:in `block in invoke_with_call_chain’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:168:in `invoke_with_call_chain’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:161:in `invoke’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:149:in `invoke_task’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:106:in `block (2 levels) in top_level’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:106:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:106:in `block in top_level’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:115:in `run_with_threads’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:100:in `top_level’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:78:in `block in run’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:165:in `standard_exception_handling’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:75:in `run’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in
`<top (required)>’
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `load’
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `
’
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe C…]
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_u
tils.rb:55:in `block in create_shell_runner’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_u
tils.rb:45:in `call’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_u
tils.rb:45:in `sh’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_u
tils_ext.rb:37:in `sh’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_u
tils.rb:82:in `ruby’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/file_u
tils_ext.rb:37:in `ruby’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/assets.rake:12:in `ruby_rake_task’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/assets.rake:21:in `invoke_or_reboot_rake_task’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.18/lib/sproc
kets/assets.rake:29:in `block (2 levels) in <top (required)>’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:236:in `call’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:236:in `block in execute’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:231:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:231:in `execute’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:175:in `block in invoke_with_call_chain’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:168:in `invoke_with_call_chain’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/task.r
b:161:in `invoke’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:149:in `invoke_task’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:106:in `block (2 levels) in top_level’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:106:in `each’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:106:in `block in top_level’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:115:in `run_with_threads’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:100:in `top_level’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:78:in `block in run’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:165:in `standard_exception_handling’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/applic
ation.rb:75:in `run’
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in
`<top (required)>’
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `load’
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `
’
Tasks: TOP => assets:precompile
Replies (1)
Fix for Windows 8/server 2012:
So after 2 days of troubleshooting, i got the assets precompiled for the production environment (took over 120 minutes). There are two items that needs to be modified in the windows installation guide for Windows server 2012 (windows 8, maybe windows 7 too idk):
1. Apply this mod to ExecJS’s runtimes.rb file: http://stackoverflow.com/questions/12520456/execjsruntimeerror-on-windows-trying-to-follow-rubytutorial. This will get rid of the problem above.
2. Do not run Bundle Update as it updates jquery-atwho-rails to a version above 0.4.1 which does not seem to work with version 3.0 of openproject.
Hope this helps someone.