Rails demo not showing up.

Hi,

Can't get the rails demo to run. I've started the webrick server. Here is what the output looks like:

you can got any error or not your server start is ok but any error you have to got please put it in this so that we r more clear about it

deostroll wrote: > Hi,

> Can't get the rails demo to run. I've started the webrick server. Here > is what the output looks like:

> ----- > [root@chat demo]# ruby script/server > => Booting WEBrick > => Rails 2.3.3 application starting onhttp://0.0.0.0:3000 > => Call with -d to detach > => Ctrl-C to shutdown server > [2009-08-18 21:29:41] INFO WEBrick 1.3.1 > [2009-08-18 21:29:41] INFO ruby 1.8.5 (2006-08-25) [i386-linux] > [2009-08-18 21:29:41] INFO WEBrick::HTTPServer#start: pid=10886 > port=3000

This looks fine. WEBrick is running on port 3000.

> -----

> I typedhttp://localhost:3000in my browser, and it didn't work.

What do you mean by "it didn't work"? What did you see in the browser?

"Firefox can't establish a connection to the server at localhost:3000"

deostroll wrote: >> > => Call with -d to detach >> > -----

>> > I typedhttp://localhost:3000inmy browser, and it didn't work.

>> What do you mean by "it didn't work"? What did you see in the browser?

> "Firefox can't establish a connection to the server at localhost:3000"

it is ur server problem and webrick server is working proper so that first of all fix localhost server probolem. --

Hi. This (centos) machine already has an apache web server running. There are some web apps (in production) working on it too. Do you suppose having two or more web servers are causing the problem?

deostroll wrote:

Hi,

Can't get the rails demo to run. I've started the webrick server. Here is what the output looks like:

----- [root@chat demo]# ruby script/server => Booting WEBrick => Rails 2.3.3 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2009-08-18 21:29:41] INFO WEBrick 1.3.1 [2009-08-18 21:29:41] INFO ruby 1.8.5 (2006-08-25) [i386-linux] [2009-08-18 21:29:41] INFO WEBrick::HTTPServer#start: pid=10886 port=3000

-----

I typed http://localhost:3000 in my browser, and it didn't work. Need some troubleshooting advice. I am trying to use ruby on a centos machine. Thanx in advance.

--deostroll

Let me get this straight. You have a server {somewhere} on which you are starting rails demo application using ssh and from your local windows machine you are trying to access it with http://localhost:3000. is this what you are trying?

http://www.classifiedscript.in Open source classifieds script in rails.

Just a thought, but you may want to check your iptables to make sure that port 3000 is accessible:

http://wiki.centos.org/HowTos/Network/IPTables

On most of the Nix boxes I set up, I harden the firewall pretty good so that only certain ports are accessible -- in fact, I only let port 80 for web and port XXXXX for SSH to do anything. Your setup may just be hardened in this manner as well.

I've typed the following at my prompt:

system-config-securitylevel

It popped up the Security Level Dialog box where it says my firewall is disabled. None of the requests are hitting my web server program in spite of this...

deostroll wrote: > Hi,

> Can't get the rails demo to run. I've started the webrick server. Here > is what the output looks like:

> ----- > [root@chat demo]# ruby script/server > => Booting WEBrick > => Rails 2.3.3 application starting onhttp://0.0.0.0:3000 > => Call with -d to detach > => Ctrl-C to shutdown server > [2009-08-18 21:29:41] INFO WEBrick 1.3.1 > [2009-08-18 21:29:41] INFO ruby 1.8.5 (2006-08-25) [i386-linux] > [2009-08-18 21:29:41] INFO WEBrick::HTTPServer#start: pid=10886 > port=3000

> -----

> I typedhttp://localhost:3000in my browser, and it didn't work. Need > some troubleshooting advice. I am trying to use ruby on a centos > machine. Thanx in advance.

> --deostroll

Let me get this straight. You have a server {somewhere} on which you are starting rails demo application using ssh and from your local windows machine you are trying to access it withhttp://localhost:3000. is this what you are trying?

Clarification: The centos machine acts like a web server. I've installs ruby, and rails on it. I was just trying to execute the demo app. I've booted my webrick server. It runs fine. But on trying to view the demo app via my firefox browser, the browser can't establish a connection. No windows machine involved here.

What is the url that you are trying to access your demo app? Is the Firefox browser on the same Centos machine? Firefox is local to where you are running webrick? If you open a different shell/window and run the command netstat -tapn is the server listening to the webrick port? (3000?) does it say 127.0.0.1:3000 or 0.0.0.0:3000 if 3000 is the port you started with. When you say 'acts like a webserver' does that mean you ran ./script/ server on the demo app? Open a new shell and do wither wget http://127.0.0.1:3000/ or telnet 127.0.0.1 3000 What happens?

Hi all,

I guess I've fixed the issue. When I typed http://0.0.0.0:3000 it worked. I had done this exercise on other machines where webrick booted on localhost. I was expecting localhost to be the case here too. Didn't see the webrick console messages ! I even thought that 0.0.0.0 was equivalent to localhost, but its not.