title: YUI Compresser runtime error
body: <pre><code>root@ip-10-0-1-218:/home/ubuntu/appname# bundle exec rake assets:precompile db:migrate RAILS_ENV=production
  /usr/local/bin/rake: No such file or directory - java
  rake aborted!
  YUI::Compressor::RuntimeError: Command 'java -jar /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8.jar --type css --charset utf-8 /tmp/yui_compress20161222-21719-d1bg4o' returned non-zero exit status
  /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:106:in `block in compress'
  /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:141:in `streamify'
  /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:86:in `compress'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/yui_compressor.rb:49:in `call'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/yui_compressor.rb:28:in `call'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
  /var/lib/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
  /var/lib/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `&lt;top (required)&gt;'
  Tasks: TOP =&gt; assets:precompile
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>I am trying to setup a rails app using Passenger and Apache on Ubuntu Linux 16.04, I am using asset pipeline for my rails app and when I'm setting up the app I get this error along with this message on my website.</p>
  
  <p><a href="https://i.stack.imgur.com/DC4lg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DC4lg.png" alt="enter image description here"></a></p>
  
  <p>I just ran the --trace option I don't know if that helps</p>
  
  <pre><code>root@ip-10-0-1-218:/home/ubuntu/appname# bundle exec rake assets:precompile db:migrate RAILS_ENV=production --trace
  ** Invoke assets:precompile (first_time)
  ** Invoke assets:environment (first_time)
  ** Execute assets:environment
  ** Invoke environment (first_time)
  ** Execute environment
  ** Execute assets:precompile
  /usr/local/bin/rake: No such file or directory - java
  rake aborted!
  YUI::Compressor::RuntimeError: Command 'java -jar /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8.jar --type css --charset utf-8 /tmp/yui_compress20161222-23696-50p1q4' returned non-zero exit status
  /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:106:in `block in compress'
  /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:141:in `streamify'
  /var/lib/gems/2.3.0/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:86:in `compress'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/yui_compressor.rb:49:in `call'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/yui_compressor.rb:28:in `call'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
  /var/lib/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
  /var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
  /var/lib/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
  /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
  /var/lib/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `&lt;top (required)&gt;'
  /usr/local/bin/rake:23:in `load'
  /usr/local/bin/rake:23:in `&lt;main&gt;'
  Tasks: TOP =&gt; assets:precompile
  </code></pre>