I have a Rails project under git.
The structure is:
SomeProject
-Docs
-Src
-Rails
Rails is the root of the rails application, but SomeProject is the root of the repo.
When I try and push to Heroku I get:
Heroku push rejected, no Cedar-supported app detected
So my questions are:
Would this be resulting because the rooot of the repo and the root of the Rails application are different?
If so is there a way I can tell Heroku where the root of the Rails application is?
If not what else would cause this problem?
This is not an ideal situation, especially for heroku, but the generally accepted solution is pretty straightforward. It will take a bit of work on your behalf, but nothing too bad.
Create two repositories, one for the rails app, and one for "SomeProject."
Add your rails app as a submodule to "SomeProject." You can add them pretty easily, using something like git submodule add [email protected]:user/rails_app/ rails. This will add the rails application as a submodule to your project, so it's essentially it's own repository. Find more information here.
Add heroku as a remote to the submodule, and when you want to deploy the app, push from the submodule, rather than the entire project.
This is not as easy as git push heroku master:'/rails', but nothing like that exists (yet, anyway).
Hope this helps!
The easiest solution is to split out your Rails application into its own repository, as andrewpthorp suggests.
Another solution is to write your own buildpack in a separate repository, based on heroku/heroku-buildpack-ruby but customized to support your alternate project layout, and use that to deploy your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With