0

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 -> 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.

Ian Ellis
  • 541
  • 6
  • 19
  • 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. – you786 Sep 19 '17 at 21:07
  • 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". – Ian Ellis Sep 19 '17 at 21:33
  • Hmm, can you post your Gemfile, and some more of the heroku log? – you786 Sep 19 '17 at 22:31
  • Possible duplicate of [remote rejected master -> master (pre-receive hook declined)](https://stackoverflow.com/questions/9542665/remote-rejected-master-master-pre-receive-hook-declined) – jpn Sep 19 '17 at 22:42

1 Answers1

0

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.

Ian Ellis
  • 541
  • 6
  • 19