Read more

Load order of the environment

Henning Koch
September 07, 2010Software engineer at makandra GmbH

Rails 3, 4, 5, 6

  1. config/application.rb
  2. config/environment.rb before the initialize! call (we don't usually edit this file)
  3. The current environment, e.g. environments/production.rb
  4. Gems
  5. Vendored plugins
  6. All initializers in config/initializers/*.rb
  7. config/environment.rb after the initialize! call (we don't usually edit this file)

Rails 2

  1. Code in config/preinitializer.rb (if it exists)
  2. environment.rb, code above the Rails::Initializer.run block (put constants here if you want to override them in environments)
  3. environment.rb, the Rails::Initializer.run block
  4. The current environment, e.g. environments/production.rb
  5. Gems
  6. Vendored plugins
  7. All initializers in config/initializers/*.rb
  8. Code below the Rails::Initializer block

Note

Consider reading the Rails initialization process guide Show archive.org snapshot for a deep dive into the initialization process.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot
Posted by Henning Koch to makandra dev (2010-09-07 12:08)