Ruby on Rails
UnderstandingDevTestProduction (Version #4)

What are the different Rails environments used for?

(by a complete non-expert; please enhance)

Rails uses three Environments: development, test, and production. Their purpose is described below.

Note that config/database.yml contains the database settings for each environment.

Do not point any of your environments at the same database. You may, for example, lose development data when running unit tests.

Development

In development, you are generally changing the code rapidly and reloading your application. If you are using Webrick (i.e. ruby script/server), you don’t need to restart the server or the application to see your changes. (but you might have to use RequireDependency instead of plain require for some files)

This is the default environment when running Rails.

Test

The test environment is for running unit and functional tests. You put test data in fixtures and run rake test.

More info needed…

Production

In production, your code is expected not to change, so models and controllers are cached to run faster. That means no repeated trips to the database to ask about columns and types.

You’d typically run a production app using FastCGI?.

category: Understanding, Stub

What are the different Rails environments used for?

(by a complete non-expert; please enhance)

Rails uses three Environments: development, test, and production. Their purpose is described below.

Note that config/database.yml contains the database settings for each environment.

Do not point any of your environments at the same database. You may, for example, lose development data when running unit tests.

Development

In development, you are generally changing the code rapidly and reloading your application. If you are using Webrick (i.e. ruby script/server), you don’t need to restart the server or the application to see your changes. (but you might have to use RequireDependency instead of plain require for some files)

This is the default environment when running Rails.

Test

The test environment is for running unit and functional tests. You put test data in fixtures and run rake test.

More info needed…

Production

In production, your code is expected not to change, so models and controllers are cached to run faster. That means no repeated trips to the database to ask about columns and types.

You’d typically run a production app using FastCGI?.

category: Understanding, Stub