Skip to content
Browse files

Show rails version when the server starts. [#235 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 4e084c3 commit c2036adf7658f56c924e2a206731ee63b628f34f @lawrencepit lawrencepit committed with lifo May 22, 2008
View
2 railties/lib/commands/servers/lighttpd.rb
@@ -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
View
2 railties/lib/commands/servers/mongrel.rb
@@ -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",
View
2 railties/lib/commands/servers/webrick.rb
@@ -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)
View
2 railties/lib/rails/mongrel_server/commands.rb
@@ -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")

1 comment on commit c2036ad

@Squeegy

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

Please sign in to comment.
Something went wrong with that request. Please try again.