heroku run rails c
- Open a terminal window.
- Navigate to the root directory of your Ruby on Rails application using the
cd
command. - Enter the Heroku command-line interface (CLI) by typing
heroku
and pressing Enter. - Execute the
run
command followed by rails c
to run the Rails console on Heroku. - The Heroku platform will spin up a remote console session for your Rails application.
- Interact with the Rails console on Heroku, allowing you to execute Ruby code and interact with your application's data.
- When finished, type
exit
to exit the Rails console on Heroku. - Close the terminal window or type
exit
again to exit the Heroku CLI.