I have tried manually clearing and setting the buildpack for my Rails app to heroku/rails. I have verified that I have a Gemfile, and I still get this error
remote: -----> Using set buildpack heroku/ruby
remote: ! Push rejected, failed to detect set buildpack heroku/ruby
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: Verifying deploy...
remote: ! Push rejected
I had the app located within a redundant subfolder in the git repo. I fixed the problem by moving everything up a level, recommitting, and
git push heroku master. Heroku was looking for a Gemfile in the top level, so I moved all the application files to the top level (where it should have been all along).