Forum: Ruby on Rails default server port

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F85e4d039cb54389389010fc095b6b6a?d=identicon&s=25 moosebrookfarm (Guest)
on 2005-12-05 17:12
(Received via mailing list)
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
F16def8015a7562a285c65a14be48540?d=identicon&s=25 mathieu.chappuis.lists (Guest)
on 2005-12-05 17:37
(Received via mailing list)
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
A52b0e1c5d982f2512a03c5dbfd033d6?d=identicon&s=25 rasputnik (Guest)
on 2005-12-05 17:57
(Received via mailing list)
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 Engelhart <moosebrookfarm@gmail.com> wrote:
> Mike
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
F85e4d039cb54389389010fc095b6b6a?d=identicon&s=25 moosebrookfarm (Guest)
on 2005-12-05 18:10
(Received via mailing list)
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
This topic is locked and can not be replied to.