Railsの設定
Gemfileの設定
#sqlite3 # <-コメントアウトする group :development, :test do gem 'sqlite3' # <-追加する end group :production do gem 'pg' # <-追加する end
config/database.ymlの設定
# 追加する production: <<: *default adapter: postgresql encoding: unicode pool: 5
config/environments/production.rbの設定
# false → trueに変更 config.assets.compile = true
Git
git init git add -A git commit -m "(コメント)"
Heroku
heroku login heroku create (サービス名)
デプロイ
git push heroku master heroku run rails db:migrate