Natan Yellin
Natan Yellin

Reputation: 6387

Rails app not recognized by Heroku

I can't push to Heroku and unfortunately none of the other questions on StackOverflow help. I'm using Rails 3.0.9 and Heroku doesn't recognize my app as a Rails app.

$ git push heroku master

Counting objects: 378, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (311/311), done.
Writing objects: 100% (378/378), 134.64 KiB, done.
Total 378 (delta 143), reused 107 (delta 12)

-----> Heroku receiving push
-----> Removing .DS_Store files

 !     Heroku push rejected due to an unrecognized error.
 !     We've been notified, see http://support.heroku.com if the problem persists.


To [email protected]:cold-xyz.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:cold-xyz.git'

Upvotes: 1

Views: 476

Answers (2)

Natan Yellin
Natan Yellin

Reputation: 6387

The repository's layout was wrong.

My rails app was in a subdirectory of the repository. I set Rails' root directory to the repositories root directory and that fixed it:

git mv subdirectory/* .

Upvotes: 1

d123
d123

Reputation: 1617

Try updating your bundle, and then pushing it again.

Or may have something to do with gemlock file?

Else if all fails, you can remove the .git file and re init again.

Upvotes: 0

Related Questions