[RUBY] Can't upload to heroku

environment

・ Rails 6.0.3.2 ・ Mysql Ver 14.14 Distrib 5.6.47 ・ Osx10.15

Synopsis

When I created a WEB application with Rails and deployed it to heroku for the first time, I could not do it well or the screen was not displayed, so there are careless mistakes, but I will post the countermeasures at that time.

Problem 1 (app name)

The underscore" _ " cannot be used in the app name or file name. In my case, I couldn't push to Github either. The hyphen"-" is available, so in my case I proceeded by changing the hyphen!

Problem 2 (migration)

Did not migrate after deployment. It was my first time, so I didn't notice this simple task. .. ..

git push heroku master

Don't forget to create a DB after that!

heroku run rake db:migrate

Problem 3 (DB type is different)

The DB of heroku was" PostgreSQL "and it was different from my environment (MySQL). Details are described in another article ↓ ・ Https://qiita.com/yamato1491038/items/4884b8d77c2852425cd1

The screen is displayed when you access while pounding! It was sunny and the deployment was completed!

Recommended Posts

Can't upload to heroku
upload images to refile heroku S3
Steps to deploy to Heroku
How to deploy on heroku
[Note] Download from S3, upload to S3
[Note] Update to production environment [heroku]
[Note] Update to production environment (heroku)
Upload multiple images to Cloudinary on Active Storage and publish to Heroku
Deploy Rails on Docker to heroku
to_ ○
How to redo a deployment on Heroku
[Rails] How to upload images using Carrierwave
I want to display background-ground-image on heroku.
Deploy to heroku with Docker (Rails 6, MySQL)
How to publish an application on Heroku
Upload Rails app image file to S3
Error when trying to use heroku command
Deploy to Heroku [Ruby on Rails] Beginner
Save images to Amazon S3 (Local / Heroku)
How to achieve file upload with Feign