title: Rake assets in Rails app Heroku
body: <p>I am trying rake assets:precompile with command "heroku run rake assets:precompile" but I have this error:</p>
  
  <pre><code>Running rake assets:precompile on ⬢ infinite-meadow-50968... up, run.9141 (Free)
  yarn install v1.8.0
  [1/4] Resolving packages...
  [2/4] Fetching packages...
  [3/4] Linking dependencies...
  [4/4] Building fresh packages...
  Done in 1.70s.
  rake aborted!
  Uglifier::Error: Unexpected character '#'
  /app/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.10/lib/uglifier.rb:234:in `parse_result'
  /app/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.10/lib/uglifier.rb:216:in `run_uglifyjs'
  /app/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.10/lib/uglifier.rb:168:in `compile'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/compressing.rb:65:in `block in js_compressor='
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy_proc_processor.rb:31:in `call'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
  /app/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
  /app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `&lt;top (required)&gt;'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:30:in `block in &lt;top (required)&gt;'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
  /app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:22:in `&lt;top (required)&gt;'
  /app/bin/bundle:3:in `load'
  /app/bin/bundle:3:in `&lt;main&gt;'
  Tasks: TOP =&gt; assets:precompile
  (See full trace by running task with --trace)
  </code></pre>
  
  <p><a href="https://github.com/piotrmatusik/testapp" rel="nofollow noreferrer">Github</a></p>
  
  <p>Styling on subpages does not work <a href="https://infinite-meadow-50968.herokuapp.com/meetups/" rel="nofollow noreferrer">https://infinite-meadow-50968.herokuapp.com/meetups/</a> See the menu and the section with meetups (in the main page its working)</p>