VPS: Rails service not available

Hi,

Im running ruby on rails on A debian VPS package.

I have installed ruby / rails all fine. I am now having a problem
running my project and serving it out to the www. I have created a
project called “test” in :

/var/www/vhosts/mydomain.com/test

I have installed the mongrel gem and im trying to run the service by
using the command:

mongrel_rails start -a 127.0.0.1

when i try to access www.mydomain.com:3000/test i just get the page
hangining briefly before timing out.

any ideas on what im doing wrong? there are no ports blocked on my
firewall currently so that all appears to be fine and port 3000 should
be accessible from the www.

Cheers,
Chris

On Jul 31, 5:51 am, Chris G. <ruby-forum-incom…@andreas-
s.net> wrote:
–snip–

I have installed the mongrel gem and im trying to run the service by
using the command:

mongrel_rails start -a 127.0.0.1

when i try to accesswww.mydomain.com:3000/testi just get the page
hangining briefly before timing out.

Presumably someone gave you the above command line without explaining
what it does. :slight_smile: The “-a 127.0.0.1” tells mongrel to only listen on
the 127.0.0.1 interface. That would be the localhost interface and is
therefore ONLY accessible from that actual machine. If you want to
access it from elsewhere just start it up with “mongrel_rails start”
and you should be ok.


Alex

Alex wrote:

On Jul 31, 5:51�am, Chris G. <ruby-forum-incom…@andreas-
s.net> wrote:
–snip–

I have installed the mongrel gem and im trying to run the service by
using the command:

mongrel_rails start -a 127.0.0.1

when i try to accesswww.mydomain.com:3000/testi just get the page
hangining briefly before timing out.

Presumably someone gave you the above command line without explaining
what it does. :slight_smile: The “-a 127.0.0.1” tells mongrel to only listen on
the 127.0.0.1 interface. That would be the localhost interface and is
therefore ONLY accessible from that actual machine. If you want to
access it from elsewhere just start it up with “mongrel_rails start”
and you should be ok.


Alex

Thanks for the reply Alex.

I have actually attempted to run the command you suggested on its own
and it still doesnt serve the project for me.

I cant work out whats wrong here at all.

and if i attempt with the ip address of the machine:

vps-1000885-330:/var/www/vhosts/chris-gallagher.com/httpdocs/test#
mongrel_rails start -a 78.153.208.167
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
** Starting Mongrel listening at 78.153.208.167:3000
** Starting Rails with development environment…
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no
restart).
** Rails signals registered. HUP => reload (without restart). It might
not work well.
** Mongrel 1.1.5 available at 78.153.208.167:3000
** Use CTRL-C to stop.

sorted this out with a config file for mongrel. silly mistake! :slight_smile:

by the way heres the output from running mongrel_rails start

vps-1000885-330:/var/www/vhosts/chris-gallagher.com/test# mongrel_rails
start
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no
restart).
** Rails signals registered. HUP => reload (without restart). It might
not work well.
** Mongrel 1.1.5 available at 0.0.0.0:3000
** Use CTRL-C to stop.