Why can't I access Webrick web server from other computers?

Hi everyone,

I have a rails project running on Ubuntu. When I ran it on localhost
http://localhost:3000, it worked perfectly. But when I tried to access
from other computers in the same network by either http://hostname:3000
or http://[ipaddress]:3000, I got a “Internet Explorer cannot display
the webpage” error.

I double checked my ubuntu with iptables, no rules are defined:

iptables -L

Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Did I miss some configurations? Any ideas?

Thanks in advance.

xianese

What does it say when ruby script/server boots up? It should be
binding to either your IP address or to 0.0.0.0 (all IP addresses).

On Jun 19, 3:01 pm, Mian Z. [email protected]

Hey,
You should start webrick or mongrel with
./script/server -b <IP_ADDRESS> -p [-e production]

Then you will be able to access it from other machines on the network.

Cheers,
Pavan

To get this working in internet explorer in development, you have to
prepend the address with HTTP:// when using a port (:3000), without
http:// IE will fail to load the page

On Jun 19, 1:35 pm, Mian Z. [email protected]

Pavankumar Kulkarni wrote:

Hey,
You should start webrick or mongrel with
./script/server -b <IP_ADDRESS> -p [-e production]

Then you will be able to access it from other machines on the network.

Cheers,
Pavan

Pavan and Julian,

it works!!!

Thanks a lot.

Mian