Repository navigation
Description
I am trying to precompile assets of my project on 3.2.6. I'm on Windows 7 OS and trying to use 1.7 RC2. The main reason for trying on RC2 is because 1.6.6 and 1.6.7 are not working on Solaris 10 OS and we have to support Solaris.
The command line and the output with trace is pasted below ...
jruby -S rake assets:precompile RAILS_RELATIVE_URL_ROOT='/abc' --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
d:/dev-tools/jruby-1.7.0.RC2/bin/jruby.exe d:/dev-tools/jruby-1.7.0.RC2/bin/rake
assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** 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
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Input/output error - Input/output error
org/jruby/RubyFile.java:1007:in utime' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc kets/static_asset.rb:47:inwrite_to'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro
ckets/static_compiler.rb:41:in write_asset' org/jruby/RubyKernel.java:1745:intap'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro
ckets/static_compiler.rb:38:in write_asset' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro ckets/static_compiler.rb:24:incompile'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc
kets/base.rb:212:in each_logical_path' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc kets/base.rb:200:ineach_file'
org/jruby/RubyArray.java:1612:in each' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc kets/base.rb:190:ineach_entry'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc
kets/base.rb:198:in each_file' org/jruby/RubyArray.java:1612:ineach'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc
kets/base.rb:197:in each_file' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/sprockets-2.1.3/lib/sproc kets/base.rb:210:ineach_logical_path'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro
ckets/static_compiler.rb:18:in compile' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro ckets/assets.rake:56:ininternal_precompile'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro
ckets/assets.rake:70:in (root)' org/jruby/RubyProc.java:249:incall'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:205:in execute' org/jruby/RubyArray.java:1612:ineach'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:200:in execute' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:158:ininvoke_with_call_chain'
D:/dev-tools/jruby-1.7.0.RC2/lib/ruby/1.9/monitor.rb:211:in mon_synchronize' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:151:ininvoke_with_call_chain'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:144:in invoke' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro ckets/assets.rake:60:in(root)'
org/jruby/RubyProc.java:249:in call' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:205:inexecute'
org/jruby/RubyArray.java:1612:in each' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:200:inexecute'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:158:in invoke_with_call_chain' D:/dev-tools/jruby-1.7.0.RC2/lib/ruby/1.9/monitor.rb:211:inmon_synchronize'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:151:in invoke_with_call_chain' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:144:ininvoke'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:116:in invoke_task' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:94:intop_level'
org/jruby/RubyArray.java:1612:in each' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:94:intop_level'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:133:in standard_exception_handling' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:88:intop_level'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:66:in run' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:133:instandard_exception_handling'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:63:in run' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/bin/rake:33: in(root)'
org/jruby/RubyKernel.java:1045:in load' d:/dev-tools/jruby-1.7.0.RC2/bin/rake:23:in(root)'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [d:/dev-tools/jruby-1.7.0.RC2/bin/jruby.exe...]
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/fil
e_utils.rb:53:in create_shell_runner' org/jruby/RubyProc.java:249:incall'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/fil
e_utils.rb:45:in sh' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/fil e_utils_ext.rb:43:insh'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/fil
e_utils.rb:80:in ruby' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/fil e_utils_ext.rb:43:inruby'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro
ckets/assets.rake:12:in ruby_rake_task' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro ckets/assets.rake:21:ininvoke_or_reboot_rake_task'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/actionpack-3.2.6/lib/spro
ckets/assets.rake:29:in (root)' org/jruby/RubyProc.java:249:incall'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:205:in execute' org/jruby/RubyArray.java:1612:ineach'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:200:in execute' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:158:ininvoke_with_call_chain'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/1.9/monitor.rb:211:in mon_synchronize' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas k.rb:151:ininvoke_with_call_chain'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/tas
k.rb:144:in invoke' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:116:ininvoke_task'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:94:in top_level' org/jruby/RubyArray.java:1612:ineach'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:94:in top_level' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:133:instandard_exception_handling'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:88:in top_level' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:66:inrun'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app
lication.rb:133:in standard_exception_handling' d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/app lication.rb:63:inrun'
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/bin/rake:33:
in (root)' org/jruby/RubyKernel.java:1045:inload'
d:/dev-tools/jruby-1.7.0.RC2/bin/rake:23:in `(root)'
Tasks: TOP => assets:precompile
Activity
enebo commentedon Oct 18, 2012
I don't suppose it is possible to try this with RubyInstaller and see if you run into the same error? The line in question is:
It could be a bug in fileutils for us on windows (although it is just a copy of MRIs fileutils). It would not surprise me if we now return yet another weird error via changes in our native layer (we switched to use all system reported errnos on windows between 1.6 and 1.7).
mbhandek commentedon Oct 19, 2012
Ok. Let me try and update the results in this thread.
BTW i'll have to see if my app works in native ruby on rails. Otherwise I'll try to create empty app and try on it.
enebo commentedon Oct 19, 2012
I am able to precompile assets without error. Part of me wonders if perhaps a file you are trying to move is perhaps opened by something else in your development environment? I know windows will not allow mv to work on an open file. Any chance this is the issue?
mbhandek commentedon Oct 22, 2012
There is no file/folder opened. If i delete tmp and public/assets, everything gets deleted fine.
rake 0.9.2.2 is same gem version I'm using on jruby 1.6.7.2 and asset precompile is working fine on it.
mbhandek commentedon Oct 22, 2012
BTW enebo, how did you figure out that it is problem with FileUtils.mv("#{filename}+", filename)?
I changed create_shell_runner to avoid truncating the command and the command line is different.
/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `create_shell_runner'
What I see is -
org/jruby/RubyKernel.java:1045:in
load' d:/dev-tools/jruby-1.7.0.RC2/bin/rake:23:in(root)'Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [d:/dev-tools/jruby-1.7.0.RC2/bin/jruby.exe d:/d
ev-tools/jruby-1.7.0.RC2/bin/rake assets:precompile:all RAILS_ENV=production RAI
LS_GROUPS=assets --trace]
d:/dev-tools/jruby-1.7.0.RC2/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/fil
e_utils.rb:53:in `create_shell_runner'
mbhandek commentedon Oct 22, 2012
Got it i traced it in sprockets source. Let me check which file is giving this vague error ...
mbhandek commentedon Oct 22, 2012
commenting "File.utime(mtime, mtime, filename) " went through and assets precompile command completed.
I think File.utime has issue. I'm now going to try warble and check out if WAR works.
Hope this helps to know the root cause.
mbhandek commentedon Oct 26, 2012
I just realized the error. It is because all the files in 'app/assets' folder were read-only. Our version controlling system makes it read-only.
Sorry to trouble you.
enebo commentedon Oct 26, 2012
Thanks for coming back and letting us know how things were resolved. We have too many issues where people forget to mention how things turned out. Also happy to know we don't have a bug :)
Squashed 'spec/ruby/' changes from ae9cea3..a2e5952