Default server port

Hi all -

sorry if this is a dumb question but I can’t figure out how to tell
Rails to launch to say localhost or instead of

the reason is that several developers are having strange network
problems when using and we use google maps that needs to be
tied to a specific domain or IP address.



from source code webrick.rb onto rails tree

opts.on("-p", “–port=port”, Integer,
“Runs Rails on the specified port.”,
“Default: 3000”) { |OPTIONS[:port]| }
opts.on("-b", “–binding=ip”, String,
“Binds Rails to the specified ip.”,
“Default:”) { |OPTIONS[:ip]| }
opts.on("-e", “–environment=name”, String,
“Specifies the environment to run this server under
“Default: development”) { |OPTIONS[:environment]| }
opts.on("-m", “–mime-types=filename”, String,
“Specifies an Apache style mime.types configuration
file to be used for mime types”,
“Default: none”) { |mime_types_file|
OPTIONS[:mime_types] =
WEBrick::HTTPUtils::load_mime_types(mime_types_file) }

opts.on("-d", “–daemon”,
“Make Rails run as a Daemon (only works if fork is available
– meaning on *nix).”
) { OPTIONS[:server_type] = WEBrick::Daemon }

opts.on("-c", “–charset=charset”, String,
“Set default charset for output.”,
“Default: UTF-8”) { |OPTIONS[:charset]| }

opts.separator “”

opts.on("-h", “–help”,
“Show this help message.”) { puts opts; exit }

hope this help



If you’re using webrick, it’s the ‘-b’ flag to ./script/server

 ./script/server -h

will list the other options you can use

On 05/12/05, Michael E. [email protected] wrote:


Rails mailing list
[email protected]

Rasputin :: Jack of All Trades - Master of Nuns

Thanks guys - actually we’re using lighttpd so I just went ahead and


to point to

the -h flag doesn’t appear to work with lighttpd.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs