Title: Push from Git to Heroku not working
Tags: ruby-on-rails;ubuntu;heroku;heroku-cli
Question: I recently updating a website where many gems had deprecated (I was using a heroku gem, for example). I'm at the final step of updating my localfiles to the production server.
When I run 'git push heroku master' I get this error:
Failed to install gems via Bundler
Push rejected, failed to compile Ruby app.
Push failed
! [remote rejected] master -&gt; master (pre-receive hook declined)
Any advice is welcome. Once again - I had to update Ruby/Rails/Heroku, so I'm sure there could be some odd compatibility issue that I'm not seeing. However I've got it all to work locally, and would expect it to work on Heroku.
Comment: Try running your app locally using `bundle exec rails s`, instead of just `rails s`. That will force the application to use to use the gems listed in your Gemfile, and may bring out any issues locally that Heroku might be running into. Post back with what you find.

Comment: Hmm, can you post your Gemfile, and some more of the heroku log?

Comment: Possible duplicate of [remote rejected master -> master (pre-receive hook declined)](https://stackoverflow.com/questions/9542665/remote-rejected-master-master-pre-receive-hook-declined)

Comment: Thank you for the response, @you786. It ran just fine with bundle exec. However it did give me a deprecation warning "You didnt set secret_key_base".


Here is another answer: It turns out, when you update from rails 3~ to rails 5, there is this thing called 12factor that you have to add to your production.rb.
https://github.com/heroku/rails_12factor
This solved my problem, and I was able to push. The next error that I ran into was H10. This is because you have to run:
rake app:update:bin
To rebuild the bin (?). Then push it, and deploy. Website is back up and running! I hope this helps someone in the future.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 4, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:09/19/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<ruby-on-rails><ubuntu><heroku><heroku-cli>', 'Title': 'Push from Git to Heroku not working', 'ViewCount': 36, 'id': 46308207, 'user_AboutMe': "<p>I've got a lot to learn. </p>\n", 'user_AccountId': 3118705.0, 'user_DisplayName': 'Ian Ellis', 'user_Reputation': 531.0, 'user_Views': 70.0, 'user_id': 2989437.0}}