0
votes

I want to push my rails application to heroku when I use git push heroku I got this error also my app in heroku not change at all. I use rails 3.27

cannot load such file -- uglifier (in /Users/ehsanvalizadeh/Documents/cafemajale/cafemajale/app/assets/javascripts/application.js) /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in require' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:inblock in require' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:236:in load_dependency' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:inrequire' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/compressors.rb:31:in registered_js_compressor' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/bootstrap.rb:18:inblock in run' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/compressors.rb:80:in call' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/compressors.rb:80:incompressor' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/compressors.rb:74:in compress' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processing.rb:265:inblock in js_compressor=' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in call' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:inevaluate' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/tilt-1.3.3/lib/tilt/template.rb:76:in render' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:177:inblock in evaluate' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in each' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:inevaluate' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/bundled_asset.rb:26:in initialize' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:innew' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in build_asset' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:89:inblock in build_asset' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/caching.rb:19:in cache_asset' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:88:inbuild_asset' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:163:in find_asset' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:56:infind_asset' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/static_compiler.rb:23:in block in compile' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:212:inblock in each_logical_path' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:200:in block (2 levels) in each_file' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:ineach' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in each_entry' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:198:inblock in each_file' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in each' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:ineach_file' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:210:in each_logical_path' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/static_compiler.rb:18:incompile' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/assets.rake:56:in internal_precompile' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/assets.rake:70:inblock (3 levels) in ' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/assets.rake:60:in block (3 levels) in <top (required)>' Tasks: TOP => assets:precompile:primary (See full trace by running task with --trace) rake aborted! Command failed with status (1): [/Users/ehsanvalizadeh/.rvm/rubies/ruby-1.9...] /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/assets.rake:12:inruby_rake_task' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/assets.rake:21:in invoke_or_reboot_rake_task' /Users/ehsanvalizadeh/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.7/lib/sprockets/assets.rake:29:inblock (2 levels) in ' Tasks: TOP => assets:precompile (See full trace by running task with --trace)

1
Can you run the app locally? Do you have therubyracer gem or equivalent installed?cih

1 Answers

1
votes

Put this line or change the existing in your Gemfile:

gem 'uglifier', :group => :production