Rails

How do I access the Rails console?

  1. 1.
    Add your SSH key to your Hatchbox web server.
  2. 2.
    SSH into your web server: ssh [email protected]
  3. 3.
    cd into the app's current directory: cd myapp/current
  4. 4.
    Run bundle exec rails c to open the Rails console.

How do I deploy a Staging application?

You'll need to do a couple things:
  • Set your Hatchbox App's RAILS_ENV environment variable to staging
  • Copy the production environment config to stagingcp config/environments/{production,staging}.rb
  • Update any other config files to include staging. Common ones you will want to make sure are configured:
    • config/cable.yml
    • config/secrets.yml
  • Commit and push these changes to git
  • Deploy to Hatchbox (consider using a staging branch for all staging code)
Last modified 3yr ago