If you are using a database other than postgreSQL, comment out the gem for that database and At the bottom of the Gemfile, declare to use postgreSQL in production and bundle install.
Gemfile
# gem 'mysql2', '>= 0.4.4', '< 0.6.0'
group :production do
gem "pg"
end
If you use a template literal in jQuery, comment out the following sentence.
environments/production.rb
# config.assets.js_compressor = :uglifier
After that, log in if registration is completed on heroku.
Terminal
$ heroku login
After that, create an application managed by GitHub on heroku.
Terminal
$heroku create app name
Execute the following code with commit and push on GitHub and merged into master.
Terminal
$ git push heroku master
Create a database on heroku.
Terminal
$ heroku run rails db:migrate
And finally open the app
Terminal
$ heroku open
Recommended Posts