Introduction
Hey, lets discuss getting a ruby on rails application up and running to heroku. This guide is built from my personal experiences and also contains points/mentions from a ruby on rails course I did a while back.
Getting ready for deployment
This guide assumes yyou are not going to use pg to manage your local development db. If you wonāt be using sqlite3, simply replace the gem with gem 'pg'
- Install heroku-cli
- log into heroku-cli
- create an heroku application
- in gemfile move sqlite3 to a new āDevelopment && testā section
- add gem āpgā to group production (PostgreSQL)
- deploy to the app from heroku dashboard deployments section, (or use
git push heroku main
after ensuring heroku remotes are added)
1
2
3
group :production do
gem 'pg' # Use Postgres for HEROKU
end
Your app should now be deployed.
Note this is a VERY basic, non detailled guide. For a detailed guide rather use the guide made by heroku themselves: Heroku guide