Use of MAC computer as remote webserver

Hello ror developers.
I Have a small Ruby on Rails program on a MAC home computer,
and wan’t to use this home computer, at the same time, as a web server with this same Ruby on Rails program being connectable from Internet and another of my computers.
I ask this question here because many rails developers has mac knowledge.

  1. ABOUT THE PROGRAM on home computer, local use:
    Pointing home computer to:
    http://localhost:3000/user/list responds “hello world” as expected.
    user and list is controller and action.
    So this Ruby on Rails program works well enough through the local server, Mongrel I guess.
    I know my Home computer IP address:, This information is available from Mac System preferences if you set the WEB SHARE flag to ON then you can read the IP address.

    Now, I wish to run the Rails program from another computer, actually the program is a browser on my Windows Mobile Phone which has its own internet connection.

Pointing the Windows Mobile Phone to: responds the index.html page which is located on home computer in the (home) Sites folder.

Pointing the Windows Mobile Phone to: responds a page with the text “it works”, I don’t know where this page is located???

Something surely works.

I think that these 2 requests are answered automatically by the mac os, the mac os respond when it receives a http request. Some server is in action, but which server, is it build into mac os. Mogrel is stopped and I have not started another.

  1. my question to you is: which address (request) should I point to from the phones webbrowser in order to connect to the Rails program located in a app0 folder???

Comments and answeres are very much appriciated.

kind regards

Home computer: mac mini, snow leopard, internet connection over USB broadband
Phone: Samsung i780, os = Windows Mobile 6.0.

thanks for the answer

I tried local
Started the mongrel server from just within then application folder.
By this process I think that Mongrel is configured to point to the beginning of the application.
Pointed to http://localhost:3000
Safari responded with WELCOME ABOARD as expected

I tried external
Pointed to
the browser responded: searching, opening… TIMEOUT while processing

I tried external + user
Pointed to
the browser responded: NOT FOUND the requested URL /~eriknnnn:3000 was not found on this server
Also there is no activity registered on the Terminal window.

can you give a possibility


Right, turned off firewall and

thanks a lot

(I will think about bringing the app into Apache server as you suggested)


do by chance have the firewall on, blocking access to port 3000?

the problem is that when you come at it from an external device, you’re using the wrong url. The url you’re given in the control panel is for the built in apache server that’s installed with the OS, which communicates via port 80… you want 3000.

You can do one of two things. Integrate your rails instance into the apache server (if you expect high traffic to site or just want a :3000less url) OR just use from your phone/external machine. That’ll use the mongrel server that rails runs on.

if you wanted to list only names and phone numbers, you could create phone.rhtml, accessible via http://localhost:3000/addresses/phone.

yes, if I point to: http://localhost:3000/addresses/phone , from my HOME COMPUTER it WILL WORK.

but if I point from another computer or a phone it will not work.

that is the problem