rails app in development doesn't show up on heroku
Im developing a rails app. Following this tutorial here:
I finished a part and wanted to push all the changes up to heroku and view them there. I can view the site on my local machine. On heroku all I see is this:
I typed in the following commands after I made my changes, saw the site was working on my local computer.
$ git add . $ git commit -m "Finish layout and routes" $ git checkout master $ git push $ git push heroku $ heroku open
I even looked at the heroku logs but couldn’t make sense of whats going wrong! There is no content in my database, its empty. I just have views setup.
2 Solutions collect form web for “rails app in development doesn't show up on heroku”
Why did you checkout to master? Are you working on another branch?
If that is the case, you will need to merge your changes to master before pushing your code (supposing you are on master which is already the case after the checkout):
git merge other-branch
Also don’t forget to migrate your database on heroku.
heroku rake db:migrate
To find out your current branch, type:
It will mark the current branch with a ‘*’.
If you have removed the public/index.html file, you’ll have to do
git rm public/index.html as well, then commit and push to Heroku. If you delete a file locally, git won’t pick up on that without doing the
git rm, and Heroku’s knowledge of your app is 100% through Git.
I had a similarly strange (but unrelated) problem when I had an app that was storing uploaded files on Heroku. Every time I’d do a push they’d all go away. It confused me greatly until I realized that Heroku essentially wipes every time you do a push, and anything that isn’t in git isn’t kept. A good reason to use S3 or similar for uploaded file storage.