0

I push object to heroku. Run git push heroku master.

It said:

Counting objects: 124, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (113/113), done.
Writing objects: 100% (124/124), 23.86 KiB | 0 bytes/s, done.
Total 124 (delta 29), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote:  !     No default language could be detected for this app.
remote:             HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote:             See https://devcenter.heroku.com/articles/buildpacks
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to fast-spire-62625.
remote:

I googled that, but I did not find the right way to fix it!

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
DavidLee
  • 53
  • 1
  • 9

2 Answers2

2

Each language/buildpack has a bin/detect file used to detect if it can be used for that app. That error indicates no default buildpacks were detected here.

The ruby buildpack relies on the presence of a Gemfile file at the top of your directory.

This error means that file wasn't found. Is this really a ruby project? Is it at the top of your directory or in a subfolder?

Damien MATHIEU
  • 31,924
  • 13
  • 86
  • 94
  • This is my Gemfile – DavidLee Sep 08 '16 at 09:32
  • I do not have file on path  `bin/detect` . – DavidLee Sep 08 '16 at 09:39
  • It causes the Error? – DavidLee Sep 08 '16 at 09:40
  • 1
    This is the issue. Having followed the railstutorial.org steps (And double checking the screenshots to ensure there wasn't a mistake) it seems that Michael Hartl did set the 'hello_app' up in a sub-folder. Heroku expects the app directory structure (ie. the Gemfile in this instance) to be in the root of the repository which is why it fails to detect automatically. The git subtree module will get you there: git subtree push --prefix heroku master – ats Feb 21 '17 at 21:25
0

You can change the buildpack used by an application by setting the buildpack value. When the application is next pushed, the new buildpack will be used.

heroku buildpacks:set heroku/ruby

Refer this

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88