Having problems after deploying the rails project (Web Development 101)


#1

Hello everyone.
I am having problems after deploying my rails blogger 2 project on heroku. The blog works fine locally but the articles dont show up on heroku. I cant also sign in to the blog on heroku. I appreciate your kind suggestions in advance.


#2

If you run heroku logs in the terminal when in the project directory it should show any errors running in production


#3

Thanks for your time. I have been able to resolve the issue. I ran heroku run rails console in terminal and examined my app for users (Author.all) and articles (Article.all). They returned empty arrays so I inferred that the user and article data I created locally didn’t get pushed to heroku with the app. I created a new user account on the deployed app and made new articles with that account and bam it worked!


#4

Yes, heroku uses a production database whereas locally you use a development one. This is to protect your production data as often with development databases you fill them with dummy data to test things.