sstephenson / sprockets

Rack-based asset packaging system
2.55k stars 24 forks source link

NameError: uninitialized constant Uglifier when precompiling assets #740

Closed dncastilho closed 8 years ago

dncastilho commented 9 years ago

My gems:

gem list

* LOCAL GEMS *

actionmailer (4.2.4) actionpack (4.2.4) actionview (4.2.4) activejob (4.2.4) activemodel (4.2.4) activerecord (4.2.4) activesupport (4.2.4) acts_as_list (0.7.2) addressable (2.3.8) arel (6.0.3) attr_required (1.0.0) autoprefixer-rails (6.0.3) bcrypt (3.1.10) bigdecimal (1.2.6) binding_of_caller (0.7.2) bootstrap-sass (3.3.5.1) bootstrap_form (2.3.0) builder (3.2.2) bundle (0.0.1) bundler (1.10.6) bundler-unload (1.0.2) byebug (6.0.2) coffee-rails (4.1.0) coffee-script (2.4.1) coffee-script-source (1.9.1.1) daemons (1.2.3) debug_inspector (0.0.2) devise (3.5.2) devise-encryptable (0.2.0) devise-i18n (0.12.1) domain_name (0.5.25) dynamic_form (1.1.4) erubis (2.7.0) eventmachine (1.0.8) execjs (2.6.0) executable-hooks (1.3.2) faraday (0.9.2) fast_gettext (0.9.2) gem-wrappers (1.2.7) gettext (3.1.7) gettext_activerecord (2.1.0) gettext_i18n_rails (1.2.3) gettext_rails (2.1.0) globalid (0.3.6) hashie (3.4.2) hpricot (0.8.6) htmlbeautifier (1.1.1) http-cookie (1.0.2) http_accept_language (2.0.5) i18n (0.7.0) i18n_data (0.7.0) io-console (0.4.3) jbuilder (2.3.2) jquery-datatables-rails (3.3.0) jquery-rails (4.0.5) jquery-ui-rails (5.0.5) json (1.8.3, 1.8.1) jwt (1.5.1) locale (2.1.2) locale_rails (2.0.5) loofah (2.0.3) mail (2.6.3) mime-types (2.6.2) mini_portile (0.6.2) minitest (5.8.1) mobile-fu-for-jquery-mobile (1.0.1) multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) mysql2 (0.3.20) netrc (0.10.3) nokogiri (1.6.6.2) oauth2 (1.0.0) omniauth (1.2.2) omniauth-facebook (2.0.1) omniauth-google-oauth2 (0.2.8) omniauth-oauth2 (1.3.1) orm_adapter (0.5.0) paypal-express (0.8.1) psych (2.0.8) rack (1.6.4) rack-mobile-detect (0.4.0) rack-test (0.6.3) rails (4.2.4) rails-assets-tether (1.1.1) rails-deprecated_sanitizer (1.0.3) rails-dom-testing (1.0.7) rails-html-sanitizer (1.0.2) rails-i18n (4.0.5) rails-jquery-autocomplete (1.0.2) railties (4.2.4) rake (10.4.2) rdoc (4.2.0) RedCloth (4.2.9) responders (2.1.0) rest-client (1.8.0) rinku (1.7.3) rubygems-bundler (1.4.4) rvm (1.11.3.9) sass (3.4.18) sass-rails (5.0.4) sdoc (0.4.1) spring (1.4.0) sprockets (3.4.0) sprockets-rails (2.3.3) summernote-rails (0.6.16.0) text (1.3.1) thin (1.6.4) thor (0.19.1) thread_safe (0.3.5) tilt (2.0.1) turbolinks (2.5.3) tzinfo (1.2.2) uglifier (2.7.2) unf (0.1.4) unf_ext (0.0.7.1) warden (1.2.3) web-console (2.2.1) will_paginate (3.0.7) will_paginate-bootstrap (1.0.1)

Error:

RAILS_ENV=production rake assets:precompile --trace * Invoke assets:precompile (first_time) * Invoke assets:environment (first_time) * Execute assets:environment * Invoke environment (first_time) * Execute environment * Execute assets:precompile rake aborted! NameError: uninitialized constant Uglifier /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/autoload/uglifier.rb:5:in <module:Autoload>' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/autoload/uglifier.rb:4:inmodule:Sprockets' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/autoload/uglifier.rb:3:in <top (required)>' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/uglifier_compressor.rb:39:ininitialize' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/uglifier_compressor.rb:24:in new' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/uglifier_compressor.rb:24:ininstance' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/uglifier_compressor.rb:28:in call' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:75:incall_processor' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:57:in block in call_processors' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:56:inreverse_each' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:56:in call_processors' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/loader.rb:134:inload_from_unloaded' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/loader.rb:60:in block in load' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/loader.rb:318:infetch_asset_from_dependency_cache' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/loader.rb:44:in load' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:20:inblock in initialize' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:47:in yield' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:47:inload' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/base.rb:66:in find_asset' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/base.rb:73:infind_all_linked_assets' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:138:in block in find' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:114:inblock (2 levels) in logical_paths' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:223:in block in stat_tree' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:207:inblock in stat_directory' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:204:in each' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:204:instat_directory' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:222:in stat_tree' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:105:ineach' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:105:in block in logical_paths' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:104:ineach' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:104:in logical_paths' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:136:infind' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:162:in compile' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:inblock (3 levels) in define' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-3.4.0/lib/rake/sprocketstask.rb:147:in with_logger' /home/rubysoccer/.rvm/gems/ruby-2.2-head/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:inblock (2 levels) in define' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:240:in call' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:240:inblock in execute' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:235:in each' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:235:inexecute' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:179:in block in invoke_with_call_chain' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/monitor.rb:211:inmon_synchronize' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:172:in invoke_with_call_chain' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/task.rb:165:ininvoke' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:150:in invoke_task' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:106:inblock (2 levels) in top_level' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:106:in each' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:106:inblock in top_level' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:115:in run_with_threads' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:100:intop_level' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:78:in block in run' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:176:instandard_exception_handling' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/rake/application.rb:75:in run' /home/rubysoccer/.rvm/rubies/ruby-2.2-head/bin/rake:33:in

' Tasks: TOP => assets:precompile

dncastilho commented 9 years ago

Installing the gem "therubyracer" and rolling uglifier back to 2.6.1 in the Gemfile ( gem 'uglifier', '~> 2.6.1' ) fixes the problem.

rafaelfranca commented 8 years ago

This issue was moved to rails/sprockets#166