Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error on server during assets precompile #56

Closed
rafalpetryka opened this issue Nov 23, 2016 · 6 comments
Closed

Runtime error on server during assets precompile #56

rafalpetryka opened this issue Nov 23, 2016 · 6 comments

Comments

@rafalpetryka
Copy link

Hi I've some error in my server. I've tried with different ruby and rails versions

RAILS_ENV=production bundle exec rake assets:precompile
rake aborted!
ExecJS::RuntimeError: 
(execjs):1
/usr/local/rvm/gems/ruby-2.2.3/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:219:in `exec_runtime'
/usr/local/rvm/gems/ruby-2.2.3/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
/usr/local/rvm/gems/ruby-2.2.3/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:14:in `initialize'
/usr/local/rvm/gems/ruby-2.2.3/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in `new'
/usr/local/rvm/gems/ruby-2.2.3/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in `compile'
/usr/local/rvm/gems/ruby-2.2.3/gems/execjs-2.7.0/lib/execjs/module.rb:27:in `compile'
/usr/local/rvm/gems/ruby-2.2.3/gems/uglifier-3.0.3/lib/uglifier.rb:130:in `initialize'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/uglifier_compressor.rb:47:in `new'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/uglifier_compressor.rb:47:in `initialize'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/uglifier_compressor.rb:24:in `new'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/uglifier_compressor.rb:24:in `instance'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/uglifier_compressor.rb:28:in `call'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/loader.rb:60:in `block in load'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/loader.rb:44:in `load'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `yield'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `load'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/base.rb:66:in `find_asset'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:142:in `block in find'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:209:in `each'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:209:in `stat_directory'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:227:in `stat_tree'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:105:in `each'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:104:in `each'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:104:in `logical_paths'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:140:in `find'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:185:in `compile'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-3.7.0/lib/rake/sprocketstask.rb:147:in `with_logger'
/usr/local/rvm/gems/ruby-2.2.3/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/usr/local/rvm/gems/ruby-2.2.3/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

@rafaelfranca
Copy link
Member

It seems to be a problem in your application. Which javascript runtime are you using?

@jeffblake
Copy link

This sounds similar to the recent error I have after the coffee-script-source 1.12.1 gem was released:

sstephenson#204

@rafalpetryka
Copy link
Author

Sorry, but I've also problem with node. When I get Segmentation Fault when I trying to get node version (node -v). Yesterday I changed my debian into ubuntu server and problem solved :)

@cookrn
Copy link

cookrn commented Mar 28, 2017

I was seeing the issue on an underpowered host when the process was killed for lack of RAM. This didn't become clear until I disabled Uglify after which I could see the Killed messaging in the logs.

@kaka-ruto
Copy link

It might be that your usage of a small RAM vps is actually causing the error. Like mine, which was 512MB. You can restart your production server and precompile the assets or , better, upgrade your vps to a higher RAM, eg 1GB or more depending on your needs.

More here: sstephenson#201

@ghost
Copy link

ghost commented May 23, 2017

I am seeing this error on a mac mini with 16GB ram (with over 8GB ram free) (so using the Apple JavaScriptCore).

I just updated our app from rails 5.0.1 to 5.0.3. This error does not occur on our staging environment (also a mac mini, but with "only" 8gb ram).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants