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 127.0.0.1 instead of 0.0.0.0
the reason is that several developers are having strange network
problems when using 0.0.0.0 and we use google maps that needs to be
tied to a specific domain or IP address.
Thanks
Mike
Hello,
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: 0.0.0.0”) { |OPTIONS[:ip]| }
opts.on("-e", “–environment=name”, String,
“Specifies the environment to run this server under
(test/development/production).”,
“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
Ciao
Mathieu
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:
Mike
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
–
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
Thanks guys - actually we’re using lighttpd so I just went ahead and
modified
commands/servers/lighttpd.rb
to point to 127.0.0.1
the -h flag doesn’t appear to work with lighttpd.
Mike