heroku run rails c

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