Local, staging, and production environments

The moment you start shipping real apps, you need to understand that your app isn't one thing — it's three copies of the same app, each running in its own environment. Local is where you build. Staging is where you test safely. Production is the real thing.

In this lesson we'll cover the mental model of three environments, explain why the isolation matters, and show how Rails knows which environment it's running in based on a single variable and a folder of config files.

  • The three environments every real Rails app has
  • Why separate environments are the thing that makes it safe to build with confidence
  • How Rails uses RAILS_ENV and the config/environments folder to keep them separate
  • How staging and production actually get deployed in Course 4
← Back to library