Andrew Patterson Andrew Patterson - 3 months ago 43
JSON Question

Heroku Toolbelt fails to detect a set buildpack

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:
remote: ! Push rejected, failed to detect set buildpack heroku/ruby
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected


Which is confusing since I set the buildpack but then it can't detect it. Some of my routes are rendering json as I wanted this app to serve as a backend API. Do I need to add a buildpack for Node? Any other suggestions?

Answer

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