mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update The Rails Initialization Process of guide [ci skip]
This commit is contained in:
parent
0e7a5661dc
commit
0027629cf6
1 changed files with 10 additions and 7 deletions
|
@ -99,13 +99,15 @@ configure the load path for your Gemfile's dependencies.
|
|||
|
||||
A standard Rails application depends on several gems, specifically:
|
||||
|
||||
* actioncable
|
||||
* actionmailer
|
||||
* actionpack
|
||||
* actionview
|
||||
* activejob
|
||||
* activemodel
|
||||
* activerecord
|
||||
* activestorage
|
||||
* activesupport
|
||||
* activejob
|
||||
* arel
|
||||
* builder
|
||||
* bundler
|
||||
|
@ -131,7 +133,7 @@ Once `config/boot.rb` has finished, the next file that is required is
|
|||
`ARGV` array simply contains `server` which will be passed over:
|
||||
|
||||
```ruby
|
||||
require "rails/command"
|
||||
require_relative "command"
|
||||
|
||||
aliases = {
|
||||
"g" => "generate",
|
||||
|
@ -170,7 +172,7 @@ module Rails::Command
|
|||
namespace = namespace.to_s
|
||||
namespace = "help" if namespace.blank? || HELP_MAPPINGS.include?(namespace)
|
||||
namespace = "version" if %w( -v --version ).include? namespace
|
||||
|
||||
|
||||
if command = find_by_namespace(namespace)
|
||||
command.perform(namespace, args, config)
|
||||
else
|
||||
|
@ -189,7 +191,7 @@ module Rails
|
|||
class ServerCommand < Base # :nodoc:
|
||||
def perform
|
||||
set_application_directory!
|
||||
|
||||
|
||||
Rails::Server.new.tap do |server|
|
||||
# Require application after server sets environment to propagate
|
||||
# the --environment option.
|
||||
|
@ -311,7 +313,7 @@ def parse!(args)
|
|||
args, options = args.dup, {}
|
||||
|
||||
option_parser(options).parse! args
|
||||
|
||||
|
||||
options[:log_stdout] = options[:daemonize].blank? && (options[:environment] || Rails.env) == "development"
|
||||
options[:server] = args.shift
|
||||
options
|
||||
|
@ -366,11 +368,11 @@ private
|
|||
|
||||
def log_to_stdout
|
||||
wrapped_app # touch the app so the logger is set up
|
||||
|
||||
|
||||
console = ActiveSupport::Logger.new(STDOUT)
|
||||
console.formatter = Rails.logger.formatter
|
||||
console.level = Rails.logger.level
|
||||
|
||||
|
||||
unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDOUT)
|
||||
Rails.logger.extend(ActiveSupport::Logger.broadcast(console))
|
||||
end
|
||||
|
@ -537,6 +539,7 @@ require "rails"
|
|||
action_mailer/railtie
|
||||
active_job/railtie
|
||||
action_cable/engine
|
||||
active_storage/engine
|
||||
rails/test_unit/railtie
|
||||
sprockets/railtie
|
||||
).each do |railtie|
|
||||
|
|
Loading…
Reference in a new issue