On Fri, Apr 10, 2015 at 5:06 AM, Lee Olayvar <
leeol...@gmail.com> wrote:
> I'm trying to make the rails CLI server bind host default to 0.0.0.0 on some
> machines i manage. Currently, it binds to localhost/
127.0.0.1, and it seems
> to keep catching new developers who are unaware of this.
that is fine. they are new developers and the default localhost is
safe for them : )
> Currently, i'm wrapping the rails command with a shell script, automatically
> injecting the `-b 0.0.0.0` flag if it is not provided. This is rather hacky
> though, and gems has issues with it (it won't uninstall rails apparently,
> but that's besides the point).
>
> Do you have any recommendations for defaulting to 0.0.0.0?
you can override Rails::Server#default_options and merge this hash
{Host: "0.0.0.0", Port:3000}
changing defaults is not my habit so i wont recommend it.
i would prefer instead creating a new rake task that start rails w the
default options i want
kind regards
--botp