hope you are fine!
Actually, I have a dockerized rails API I'm working on.& I have to push it on Heroku.
I add pg gem to my production environment & move MySql gem to the development environment
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
gem 'mocha'
gem 'webmock'
gem 'mysql2'
end
group :production do
gem 'pg', '1.2.3'
end
And after that, I run docker-compose up --build & after pushing my code to git I run git push heroku <branch name> everything works fine.
but when I run heroku run rails db:migrate i got an error
rails aborted! NoMethodError: Cannot load database configuration: undefined method `[]' for nil:NilClass
This is my first time to push a dockerized project on Heroku, I don't know how to do this. can anyone please guide me?