rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.67k stars 190 forks source link

use therubyracer to precompile asset error #448

Closed bestony closed 5 years ago

bestony commented 5 years ago

i install therubyracer and want to precompile asset ,but i get an error ,ther is the trace information.

** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke yarn:install (first_time)
** Execute yarn:install
yarn install v1.6.0
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
info Lockfile not saved, no dependencies.
✨  Done in 0.06s.
** Execute assets:precompile
rails aborted!
NameError: uninitialized constant ExecJS::Runtimes::RubyRacerRuntime
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `block in load_missing_constant'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `rescue in load_missing_constant'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:42:in `load_missing_constant'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/autoprefixer-rails-9.1.3/lib/autoprefixer-rails/processor.rb:149:in `runtime'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/autoprefixer-rails-9.1.3/lib/autoprefixer-rails/processor.rb:37:in `process'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/autoprefixer-rails-9.1.3/lib/autoprefixer-rails/sprockets.rb:20:in `run'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/autoprefixer-rails-9.1.3/lib/autoprefixer-rails/sprockets.rb:14:in `call'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in `block in call'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in `dfs'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in `call'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in `block in find'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `each'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `find'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/command.rb:48:in `invoke'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/Users/bestony/Code/rails/link/bin/rails:9:in `<top (required)>'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
/Users/bestony/.rbenv/versions/2.4.4/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'

my ruby version is ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-darwin17] my rails version is Rails 5.2.1

lordplagus02 commented 5 years ago

+1 just started happening to me as well.

ignisf commented 5 years ago

This has been fixed by https://github.com/ai/autoprefixer-rails/pull/142