Methods
A
D
L
M
N
O
S
Classes and Modules
Class Public methods
new(*)
    # File railties/lib/rails/commands/server.rb, line 40
40:     def initialize(*)
41:       super
42:       set_environment
43:     end
Instance Public methods
app()
    # File railties/lib/rails/commands/server.rb, line 45
45:     def app
46:       @app ||= super.respond_to?(:to_app) ? super.to_app : super
47:     end
default_options()
    # File railties/lib/rails/commands/server.rb, line 89
89:     def default_options
90:       super.merge({
91:         :Port        => 3000,
92:         :environment => (ENV['RAILS_ENV'] || "development").dup,
93:         :daemonize   => false,
94:         :debugger    => false,
95:         :pid         => File.expand_path("tmp/pids/server.pid"),
96:         :config      => File.expand_path("config.ru")
97:       })
98:     end
log_path()
    # File railties/lib/rails/commands/server.rb, line 85
85:     def log_path
86:       "log/#{options[:environment]}.log"
87:     end
middleware()
    # File railties/lib/rails/commands/server.rb, line 77
77:     def middleware
78:       middlewares = []
79:       middlewares << [Rails::Rack::LogTailer, log_path] unless options[:daemonize]
80:       middlewares << [Rails::Rack::Debugger]  if options[:debugger]
81:       middlewares << [::Rack::ContentLength]
82:       Hash.new(middlewares)
83:     end
opt_parser()
    # File railties/lib/rails/commands/server.rb, line 49
49:     def opt_parser
50:       Options.new
51:     end
set_environment()
    # File railties/lib/rails/commands/server.rb, line 53
53:     def set_environment
54:       ENV["RAILS_ENV"] ||= options[:environment]
55:     end
start()
    # File railties/lib/rails/commands/server.rb, line 57
57:     def start
58:       url = "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}"
59:       puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
60:       puts "=> Rails #{Rails.version} application starting in #{Rails.env} on #{url}"
61:       puts "=> Call with -d to detach" unless options[:daemonize]
62:       trap(:INT) { exit }
63:       puts "=> Ctrl-C to shutdown server" unless options[:daemonize]
64: 
65:       #Create required tmp directories if not found
66:       %w(cache pids sessions sockets).each do |dir_to_make|
67:         FileUtils.mkdir_p(Rails.root.join('tmp', dir_to_make))
68:       end
69: 
70:       super
71:     ensure
72:       # The '-h' option calls exit before @options is set.
73:       # If we call 'options' with it unset, we get double help banners.
74:       puts 'Exiting' unless @options && options[:daemonize]
75:     end