Need clarification on accessing application over LAN

18 views
Skip to first unread message

Padmahas Bn

unread,
Jul 8, 2015, 8:07:15 AM7/8/15
to rubyonra...@googlegroups.com
Hello all,

Instead of hosting my rails app, if I run the rails app in one system using rails s (default server), how can I access localhost:3000/ from another system connected over Local Area Network (LAN) ?

Thank you.

Colin Law

unread,
Jul 8, 2015, 8:35:19 AM7/8/15
to rubyonra...@googlegroups.com
It might well just work. Assuming the ip address of the server is
192.168.1.nn then use 192.168.1.nn:3000

If not then what operating system are you using?

Colin

>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/79ce0fc7-0172-4cdc-b04b-572d536e9c0b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Frederick Cheung

unread,
Jul 9, 2015, 3:16:36 AM7/9/15
to rubyonra...@googlegroups.com, cla...@gmail.com
On Wednesday, July 8, 2015 at 1:35:19 PM UTC+1, Colin Law wrote:
> On 8 July 2015 at 13:07, Padmahas Bn <padm...@gmail.com> wrote:
> > Hello all,
> >
> > Instead of hosting my rails app, if I run the rails app in one system using
> > rails s (default server), how can I access localhost:3000/ from another
> > system connected over Local Area Network (LAN) ?
>
> It might well just work. Assuming the ip address of the server is
> 192.168.1.nn then use 192.168.1.nn:3000
>
> If not then what operating system are you using?
>

As of rails 4.2 you also need to use the -b option to bind to the correct interface (the default is just localhost

Fred
Reply all
Reply to author
Forward
0 new messages