2

On one of my linux servers when I run...

 bundle exec rake assets:precompile RAILS_ENV=production --trace

I'm getting the following error...

** Invoke assets:precompile (first_time)
** Execute assets:precompile
/usr/local/bin/ruby /srv/www/example.com/shared/bundle/ruby/1.9.1/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!
Command failed with status (): [/usr/local/bin/ruby /srv/www/example.com/s...]
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `call'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `sh'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `sh'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:80:in `ruby'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `ruby'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/srv/www/example.com/shared/bundle/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/srv/www/example.com/shared/bundle/ruby/1.9.1/bin/rake:23:in `load'
/srv/www/example.com/shared/bundle/ruby/1.9.1/bin/rake:23:in `<main>'

I'm using Rails 3.2.11, tried digging through the rake code but I'm no rake expert. Anyone experience this? Unsure how to debug? Thanks.

HelloWorld
  • 4,251
  • 8
  • 36
  • 60
  • Are you sure you're in the right project folder when executing the command? – fmendez Mar 08 '13 at 18:48
  • yeah, else it would say Could not locate gemfile. – HelloWorld Mar 08 '13 at 18:49
  • sorry got confused for a sec with the all the www/example.com, but that's where your gems lives. Could you try adding `config.assets.initialize_on_precompile = false` (assuming you dont have it) on your `config/application.rb` and running the command again? – fmendez Mar 08 '13 at 18:58
  • hmm vied that file and added that line and ran the command, same error – HelloWorld Mar 08 '13 at 19:16
  • Are you on github? if possible Can you provide your github link for this problem? with source code ? – AMIC MING Mar 08 '13 at 22:21

1 Answers1

0

The kernel actively kills processes when RAM is short and processes use too much RAM. I switched my server to dev mode (since its a test server) to skip the assets precompile part and its functional for now.

HelloWorld
  • 4,251
  • 8
  • 36
  • 60