Problems pushing to Heroku

I have created an app in rails and i am trying to push to heroku for the first time. It is working fine in localhost but will not let me push to heroku.....the error is directing me to production in environments but all the code there seems to be ok? `Bundle completed (42.41s) Cleaning up the bundler cache. -----> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! SyntaxError: /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/config/environments/production.rb:87: syntax error, unexpected keyword_end, expecting end-of-input /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/engine.rb:593:in `each' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/engine.rb:593:in `block in <class:Engine>' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:44:in `each' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:44:in `tsort_each_child' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/config/environment.rb:5:in `<top (required)>' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks' /tmp/build_b2f428c1-8600-4c1d-a692-c1d375dcbdd4/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:55:in `block (2 levels) in define' Tasks: TOP => environment (See full trace by running task with --trace) ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app

Posted over 5 years ago by Emma
Posted over 5 years ago by Emma

Thanks I managed to get it to work by replacing localhost with my heroku repo. Thanks!

0
Posted over 5 years ago by Alex Yang

Ah that makes sense. I think the colon in 'localhost:3000' makes your app think it's a syntax error.

0
Posted over 5 years ago by Alex Yang

Emma, it looks like you have a SyntaxError in your config/environments/production.rb file. This probably means that you have a typo somewhere in that file. It could be a rogue comma at the end of the line, a missing closing parentheses, or something else.

0