Deploying To Heroku
If you have already deployed your app to Heroku, go on to Deploying to Heroku again.
Step 1: Create a Heroku application
Type this in the terminal:heroku create
Step 2: Edit the Gemfile
gem 'sqlite3'
group :development, :test do gem 'sqlite3' end group :production do gem 'pg', '~> 0.18' end
Step 3: Apply the Gemfile changes
Type this in the terminal:bundle install --without production
Step 4: Commit the Gemfile changes
Type this in the terminal:git add . git commit -m "Changed Gemfile for Heroku"
Step 5: Commit any pending changes to git
Type this in the terminal:git statusType this in the terminal:git add . git commit -m "Some helpful message for your future self"
Step 6: Push changes to Heroku
Type this in the terminal:git push heroku main
Step 7: Run database migrations on Heroku
Type this in the terminal:heroku run rails db:migrate
Step 8: Visit your application
Type this in the terminal:heroku open