rails/rails — Issue #3306: Rake assets:precompile fails on Rails 3.1.1 but not on Rails 3.1.1.rc2
Author: plindelauf
Created: 2011-10-12 07:21:24+00:00
State: open

Whenever I run a `rake assets:precompile` locally or it is run during deployment to Heroku Cedar, it fails. This was the case with Rails 3.1.0 but was solved in Rails 3.1.1.rc2. However, now that I'm on Rails 3.1.1, the problem is back again. Rails 3.1.1.rc3 does not work either, so for now I'm running on 3.1.1.rc2.

This is the trace I'm getting:

/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
/Users/pascal/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3
** 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
rake aborted!
ENV variable 'S3_KEY' needs to be set - use
heroku config:add S3_KEY=XXXXXXXXX
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/dragonfly-0.9.8/lib/dragonfly/config/heroku.rb:11:in `block (2 levels) in apply_configuration'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:35:in `configure'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/dragonfly-0.9.8/lib/dragonfly/config/heroku.rb:9:in `block in apply_configuration'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:35:in `configure'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/dragonfly-0.9.8/lib/dragonfly/config/heroku.rb:7:in `apply_configuration'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:41:in `configure_with'
/Users/pascal/Projecten/RoR/bizplay/config/initializers/dragonfly.rb:7:in `'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:234:in `load'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:234:in `block in load'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:234:in `load'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/engine.rb:556:in `block (2 levels) in '
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/engine.rb:555:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/engine.rb:555:in `block in '
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/initializable.rb:30:in `instance_exec'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/initializable.rb:30:in `run'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/initializable.rb:54:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/initializable.rb:54:in `run_initializers'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/application.rb:96:in `initialize!'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/pascal/Projecten/RoR/bizplay/config/environment.rb:5:in `'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:240:in `require'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:240:in `block in require'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/activesupport-3.1.1.rc3/lib/active_support/dependencies.rb:240:in `require'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/application.rb:83:in `require_environment!'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.1.rc3/lib/rails/application.rb:193:in `block (2 levels) in initialize_tasks'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/pascal/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/actionpack-3.1.1.rc3/lib/sprockets/assets.rake:89:in `block (2 levels) in '
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/pascal/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/pascal/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/gems/actionpack-3.1.1.rc3/lib/sprockets/assets.rake:56:in `block (3 levels) in '
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/pascal/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake:32:in `'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/bin/rake:19:in `load'
/Users/pascal/.rvm/gems/ruby-1.9.2-p290@rails31/bin/rake:19:in `

'
Tasks: TOP => environment
rake aborted!
Command failed with status (1): [/Users/pascal/.rvm/rubies/ruby-1.9.2-p290/...]

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

As for the S3_KEY warning: that environment variable *is* set on Heroku Cedar, but still it pops up this warning.