Forum: Ruby on Rails Viewing Rails from non-localhost using WEBrick server

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.
stan.baptista (Guest)
on 2007-01-24 03:15
(Received via mailing list)
During development, I'd like to see my Rails app from a computer other
than localhost on a Linux system and also want to change the default
port#. I thought this would do it:

Linux server:
$ script/server -b 10.4.1.84  -p 5432
=> Booting WEBrick...
=> Rails application started on http://10.4.1.84:5432
=> Ctrl-C to shutdown; call with --help for options
...

Windows browser URL:
http://10.4.1.84:5432/

BUT, the browser can't find this and the WEBrick server on Linux shows
no activity.

Anyone know what gives?
Randall Potter (Guest)
on 2007-01-24 03:26
(Received via mailing list)
Did you open that port (5432) under iptables?

--R
stan.baptista (Guest)
on 2007-01-24 03:37
(Received via mailing list)
> Did you open that port (5432) under iptables?

Don't know for sure but I'll check. I'm primarily a Windows developer,
just starting to move initial development over to Linux. The sys admin
gave me the port #.

(I'm in-between systems at the moment which is why I wanted to view the
app from my Windows system.)

btw, SHOULD the script work?
Randall Potter (Guest)
on 2007-01-24 03:47
(Received via mailing list)
stan.baptista wrote:
> Don't know for sure but I'll check. I'm primarily a Windows developer,
> just starting to move initial development over to Linux. The sys admin
> gave me the port #.
>
> (I'm in-between systems at the moment which is why I wanted to view the
> app from my Windows system.)
>
> btw, SHOULD the script work?
>
>

To test open up lynx or some other console based web browser from the
Linux command line and point it to http://localhost:5432/  if that works
then it's most likely iptables.

--R
stan.baptista (Guest)
on 2007-01-24 22:00
(Received via mailing list)
> then it's most likely iptables.

Yes. Thanks for the help.
Russell N. (Guest)
on 2007-01-26 17:16
(Received via mailing list)
I dunno if this helps but I added another domain in /etc/hosts.

127.0.0.1    localhost
127.0.1.1    [other mock domain name]

This indeed works great for testing two domains. Or at least it appears.
request.domain is correct [and different] for both.

RSL
Stan Baptista (Guest)
on 2007-01-26 23:14
(Received via mailing list)
Thanks Russell
Dave S. (Guest)
on 2011-01-19 00:00
This one had me stumped for a while too but I have found if you modify
Webrick config.rb and change the entry :DoNotReverseLookup => 'nil,' to
'true,' your non-local host will be able to connect with the Webrick
server.

You can find the config.rb file for Rails 1.9.1 and 1.9.2 in this
directory .../usr/lib/ruby/1.9.1/webrick/config.rb
Marnen L. (Guest)
on 2011-01-19 00:26
stan.baptista wrote in post #195212:
>> Did you open that port (5432) under iptables?
>
> Don't know for sure but I'll check. I'm primarily a Windows developer,
> just starting to move initial development over to Linux. The sys admin
> gave me the port #.

Then the sysadmin needs a cluebat to the head.  5432 is the standard
port for PostgreSQL and probably shouldn't be used for other purposes...
>
> (I'm in-between systems at the moment which is why I wanted to view the
> app from my Windows system.)
>
> btw, SHOULD the script work?

I'm not sure if you need the -b.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
removed_email_address@domain.invalid

Sent from my iPhone
This topic is locked and can not be replied to.