Milos
Milos

Reputation: 1263

Issue with Git folder placement and Heroku deployment

When I first ran my rails generator it created a folder inside of the folder I wanted to have my repository work from. What I mean by this is my github folder structure looks like this:

https://github.com/milosbunijevac/medRails

the medtools folder has the entire project, but the initial repository was started one level above the medtools folder as the repository above shows.

When I run the following commands:

heroku create 
heroku buildpacks:add --index 1 heroku/nodejs
heroku buildpacks:add --index 2 heroku/ruby

and then git push heroku master from the root directory (one level above medtools) I get an error saying that app not compatible with buildpack and that the push was rejected. I'm thinking it has something to do with this strange folder structure. Do you guys and gals have any insights as to how I might fix this issue and get my project to deploy to heroku?

Upvotes: 1

Views: 65

Answers (1)

VonC
VonC

Reputation: 1324073

You could locally move everything one level up, and push back to GitHub, done in a bash session:

cd /path/to/repo
git mv medtools/* .
git rm medtools
git add .
git commit -m "move medtools content"
git push

As the OP Milos comments below, you might have to tweak the .gitignore content.

Upvotes: 1

Related Questions