Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Show rails version when the server starts. [#235 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information
lawrencepit authored and lifo committed May 22, 2008
1 parent 4e084c3 commit c2036ad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion railties/lib/commands/servers/lighttpd.rb
Expand Up @@ -62,7 +62,7 @@
default_port, default_ip = 3000, '0.0.0.0'
port = config.scan(/^\s*server.port\s*=\s*(\d+)/).first rescue default_port
ip = config.scan(/^\s*server.bind\s*=\s*"([^"]+)"/).first rescue default_ip
puts "=> Rails application starting on http://#{ip || default_ip}:#{port || default_port}"
puts "=> Rails #{Rails.version} application starting on http://#{ip || default_ip}:#{port || default_port}"

tail_thread = nil

Expand Down
2 changes: 1 addition & 1 deletion railties/lib/commands/servers/mongrel.rb
Expand Up @@ -32,7 +32,7 @@
opts.parse!
end

puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
puts "=> Rails #{Rails.version} application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"

parameters = [
"start",
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/commands/servers/webrick.rb
Expand Up @@ -61,6 +61,6 @@

OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT)

puts "=> Rails application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
puts "=> Rails #{Rails.version} application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
puts "=> Ctrl-C to shutdown server; call with --help for options" if OPTIONS[:server_type] == WEBrick::SimpleServer
DispatchServlet.dispatch(OPTIONS)
2 changes: 1 addition & 1 deletion railties/lib/rails/mongrel_server/commands.rb
Expand Up @@ -119,7 +119,7 @@ def run
config = RailsConfigurator.new(settings) do
defaults[:log] = $stdout if defaults[:environment] == 'development'

Mongrel.log("=> Rails application starting on http://#{defaults[:host]}:#{defaults[:port]}")
Mongrel.log("=> Rails #{Rails.version} application starting on http://#{defaults[:host]}:#{defaults[:port]}")

unless defaults[:daemon]
Mongrel.log("=> Call with -d to detach")
Expand Down

1 comment on commit c2036ad

@AlexJWayne
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to say, this tiny chnage is way handy and helpful. Thanks!

Please sign in to comment.