Rails demo not showing up.

10 views
Skip to first unread message

deostroll

unread,
Aug 19, 2009, 3:03:46 AM8/19/09
to Ruby on Rails: Talk
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

Wap Addon

unread,
Aug 19, 2009, 3:07:43 AM8/19/09
to rubyonra...@googlegroups.com
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
--
Posted via http://www.ruby-forum.com/.

Marnen Laibow-Koser

unread,
Aug 19, 2009, 3:12:17 AM8/19/09
to rubyonra...@googlegroups.com
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

This looks fine. WEBrick is running on port 3000.

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

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

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org0

deostroll

unread,
Aug 19, 2009, 3:28:23 AM8/19/09
to Ruby on Rails: Talk


On Aug 19, 3:12 am, Marnen Laibow-Koser <rails-mailing-l...@andreas-
s.net> wrote:
> 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"

> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org0
> --
> Posted viahttp://www.ruby-forum.com/.

Wap Addon

unread,
Aug 19, 2009, 3:38:36 AM8/19/09
to rubyonra...@googlegroups.com
deostroll wrote:
> On Aug 19, 3:12�am, Marnen Laibow-Koser <rails-mailing-l...@andreas-
> s.net> wrote:
>> > => Call with -d to detach
>> > -----
>>
>> > 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"

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

deostroll

unread,
Aug 19, 2009, 6:12:49 AM8/19/09
to Ruby on Rails: Talk


On Aug 19, 3:38 am, Wap Addon <rails-mailing-l...@andreas-s.net>
wrote:
> deostroll wrote:
> > On Aug 19, 3:12 am, Marnen Laibow-Koser <rails-mailing-l...@andreas-
> > s.net> 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?
> Posted viahttp://www.ruby-forum.com/.

Rails List

unread,
Aug 19, 2009, 7:34:17 AM8/19/09
to rubyonra...@googlegroups.com

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.

Billee D.

unread,
Aug 19, 2009, 12:35:14 PM8/19/09
to Ruby on Rails: Talk
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.


On Aug 19, 3:03 am, deostroll <deostr...@gmail.com> 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

deostroll

unread,
Sep 13, 2009, 1:12:47 PM9/13/09
to Ruby on Rails: Talk
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...

On Aug 19, 12:35 pm, "Billee D." <william.dod...@gmail.com> wrote:
> 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.
>
> On Aug 19, 3:03 am, deostroll <deostr...@gmail.com> 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:3000inmy browser, and it didn't work. Need

deostroll

unread,
Sep 13, 2009, 1:18:18 PM9/13/09
to Ruby on Rails: Talk


On Aug 19, 7:34 am, Rails List <rails-mailing-l...@andreas-s.net>
wrote:
> 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.

heimdull

unread,
Sep 13, 2009, 5:44:37 PM9/13/09
to Ruby on Rails: Talk
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?

deostroll

unread,
Sep 14, 2009, 2:47:28 PM9/14/09
to Ruby on Rails: Talk
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.
> Open a new shell and do wither wgethttp://127.0.0.1:3000/or telnet
> 127.0.0.1 3000 What happens?
Reply all
Reply to author
Forward
0 new messages