Question

I get the following error when trying to deploy my Play 2.2.2 application to Heroku.

    158-37-227-60:Bachelorprosjekt Magne$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-scala.git
Creating murmuring-scrubland-2494... done, stack is cedar
BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala.git
http://murmuring-scrubland-2494.herokuapp.com/ | git@heroku.com:murmuring-scrubland-2494.git
158-37-227-60:Bachelorprosjekt Magne$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
158-37-227-60:Bachelorprosjekt Magne$ git remote add heroku git@heroku.com:murmuring-scrubland-2494.git
158-37-227-60:Bachelorprosjekt Magne$ git push heroku master
Initializing repository, done.
Counting objects: 627, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (627/627), 290.28 KiB | 166.00 KiB/s, done.
Total 627 (delta 312), reused 573 (delta 286)

-----> Fetching custom git buildpack... done

 !     Push rejected, no Cedar-supported app detected

To git@heroku.com:murmuring-scrubland-2494.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:murmuring-scrubland-2494.git'

My Procfile looks like this:

web: target/universal/stage/bin/Bachelorprosjekt -Dhttp.port=$PORT

I've been searching everywhere for a solution to this, but the solutions to similar questions haven't helped me so far :S

UPDATE: When I try to deploy without specifying the build pack, Heroku tries to deploy it as a Play 1.2.7 app instead of the Play 2.2.2 app it really is. Obviously the deployment fails every time. This is the output I get:

-----> Play! app detected
-----> Installing OpenJDK 1.6...done
-----> WARNING: Play! version not specified in dependencies.yml. Default version: 1.2.7 being used....
-----> Installing Play! 1.2.7.....
-----> done
-----> Installing ivysettings.xml..... done
-----> Building Play! application...
       ~        _            _ 
       ~  _ __ | | __ _ _  _| |
       ~ | '_ \| |/ _' | || |_|
       ~ |  __/|_|\____|\__ (_)
       ~ |_|            |__/   
       ~
       ~ play! 1.2.7, http://www.playframework.org
       ~
       1.2.7
       Building Play! application at directory ./
       Resolving dependencies: .play/play dependencies ./ --forProd --forceCopy --silent -Duser.home=/tmp/build_addb406e-ac10-446c-bec7-3e6c14ad98e8 2>&1
       ~ !! /tmp/build_addb406e-ac10-446c-bec7-3e6c14ad98e8/conf/dependencies.yml does not exist
 !     Failed to build Play! application
 !     Cleared Play! framework from cache

 !     Push rejected, failed to compile Play! app

To git@heroku.com:praksisreg.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:praksisreg.git'
Was it helpful?

Solution 2

Solved. There was a problem where Heroku couldn't deploy my project with the current project structure. My project was inside another folder and had to be at the root level for Heroku to succesfully deploy the app.

OTHER TIPS

As stated by heroku itself it is not possible to have projects in subfolders.

But you can use the git subtree Parameter to push a subfolder onto herokus root.

git subtree push --prefix subfoldername heroku master

See this Link for more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top