LogoLogo
  • Hatchbox Classic Support
  • Clusters
  • Providers
  • Servers
  • Apps
    • ActionCable
    • Background Workers
    • Backups
    • BitBucket
    • Cron Jobs
    • Deploy Scripts
    • Domains & DNS
    • ElasticSearch
    • File Uploads
    • Image Processing
    • Jekyll
    • Passenger
    • Postgres
    • Puma
    • Rails
    • Rake
    • React On Rails
    • Ruby Versions
    • Sitemaps
    • Sphinx
    • SSL
    • Webhooks & Auto-Deploy
    • Webpacker
  • Security
  • Support
  • Databases
    • Backup & Restore
Powered by GitBook
On this page
  • How do I access the Rails console?
  • How do I deploy a Staging application?
  1. Apps

Rails

How do I access the Rails console?

  1. Add your SSH key to your Hatchbox web server.

  2. SSH into your web server: ssh deploy@x.x.x.

  3. cd into the app's current directory: cd myapp/current

  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)

PreviousPumaNextRake

Last updated 6 years ago