Engine
with the responsibility of coordinating the whole boot process.Rails::Application
is responsible for executing all railties and engines initializers. It also executes some bootstrap initializers (check Rails::Application::Bootstrap
) and finishing initializers, after all the others are executed (check Rails::Application::Finisher
).Configuration
Rails::Engine
and Rails::Railtie
, the application object has several specific configurations, for example “cache_classes”, “consider_all_requests_local”, “filter_parameters”, “logger” and so forth.Rails::Application::Configuration
to see them all.Application
is also responsible for building the middleware stack.Rails.application
, unless you override it with a different application.initialize_copy
on one of the applications to create a copy of the application which shares the configuration.Rails.application
, then you must run them manually.[RW] | assets |
[W] | config |
[R] | executor |
[R] | reloader |
[R] | reloaders |
[RW] | sandbox |
[RW] | sandbox? |
[W] | secrets |
Rails
env.console
method defined in Rails::Railtie
.config/credentials.yml.enc
. This file is encrypted with the Rails
master key, which is either taken from ENV['RAILS_MASTER_KEY']
or from loading config/master.key
. If specific credentials file exists for current environment, it takes precedence, thus for production
environment look first for config/credentials/production.yml.enc
with master key taken from ENV['RAILS_MASTER_KEY']
or from loading config/credentials/production.key
. Default behavior can be overwritten by setting config.credentials.content_path
and config.credentials.key_path
.rails encrypted:edit
call read
to decrypt the file with the master key. The master key is either stored in config/master.key
or ENV['RAILS_MASTER_KEY']
.config
.ENV
, use:Rails.root
:Rails
initial environment parameters which will be used by middlewares and engines to configure themselves.generators
method defined in Rails::Railtie
.initializer
method defined in the Rails::Initializable
module. Each Rails::Application
class has its own set of initializers, as defined by the Initializable
module.isolate_namespace
method up to the class method.verifier_name
argument.verifier_name
- the name of the message verifier.ActiveSupport::MessageVerifier
Windows 7 key generator download. documentation for more information.runner
method defined in Rails::Railtie
.secret_key_base
is used as the input secret to the application's key generator, which in turn is used to create all MessageVerifiers/MessageEncryptors, including the ones that sign and encrypt cookies.tmp/development_secret.txt
.Rails.application.secrets.namespace
returns my_app_production
in the production environment.