Gemfileを変更 gem 'sqlite3'と書いてある箇所をコメントアウト # sqlite3 Gemfileに一部追加 group :development, :test do gem 'sqlite3' end Gemfileに最後部に追加 group :production do gem 'pg' end ターミナル bundle install --without production config/database.yml production: #半角スペース2個分の空白を開ける <<: *default adapter: postgresql encoding: unicode pool: 5 config/environments/production.rb #デフォルトでfalseとなっている以下の箇所をtrueに変更 config.assets.compile = true ターミナル git init git add -A #保存するファイルの選択。-Aは全部 git commit -m "first commit" #addしたファイルの保存の確定 git config --global user.email "登録email" git config --global user.name "登録username" git commit -m "first commit" heroku login heroku create 好きなアプリ名 git push heroku master heroku run rails db:migrate heroku open