4

On github I have a Rails app in a sub-directory of a directory, github.com/sadaf2605/directory/subdirectory/{rails app}. When I try to push this app to Heroku I get an error:

 !     Heroku push rejected, no Cedar-supported app detected

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

After reading "Heroku push rejected, no Cedar-supported app detected wordpress", I learned that this sub-directory is causing the problem. But, I want this sub directory to remain at github as it helps me to organize my work yet I don't want to change the route.rb. Is it possible?

1
  • 2
    Probably best action would be to make the rails app it's own git repository and then make it a submodule of the first repository. Commented Jan 6, 2013 at 19:57

1 Answer 1

4

Checkout the git-subtree plugin. You can use it to split subtrees from your project into subprojects and back.

git subtree push --prefix {rails app} heroku master

Clone the github project and run sudo sh install.sh to install the plugin. Full usage instructions are in the here

Sign up to request clarification or add additional context in comments.

1 Comment

Subtree has since been incorporated into git so you can now run the command above without the need to install a plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.