When I deployed my Skills Compiler rails app the other day,
I ran into a few issues deploying to Heroku that were worth mentioning.
- Deploying from a folder that is not the
root.
As stated on the Heroku website:Heroku apps expect the app directory structure at the root of the repository. If your app is inside a subdirectory in your repository, it won’t run when pushed to Heroku.
I ended up finding this site: https://coderwall.com/p/ssxp5q that had the same issue and solved it by pushing a subtree. It is as simple as this command:
git subtree push --prefix subfolder heroku master - Make sure your git ignores are correct.
When I pushed to Heroku using the command above, nothing ended up working. The console logs weren't much help (just kept giving me generic errors), and when I used the console to list the files, everything appeared to be copied over correctly. After some digging I realized that none of the rails commands were working on Heroku. I eventually found an error that pointed me to an issue with something missing from the bin folder. I found that because I was using the default .gitignore file from GitHub with a few altercations, that the /bin folder was globally ignored due to .Net & (I believe) Java. After a few modifications to the .gitignore file I finally got my site up and running on Heroku.
No comments:
Post a Comment