erik8085 — 2010-05-28T17:47:45-04:00 — #1
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.
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: http://nn.nnn.nnn.nn.bredband.3.dk/~erikaaaa/, This information is available from Mac System preferences if you set the WEB SHARE flag to ON then you can read the IP address.
CONNECTING TO HOME COMPUTER FROM ANOTHER COMPUTER, remote use.
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:
http://nn.nnn.nnn.nn.bredband.3.dk/~erikaaaa/ responds the index.html page which is located on home computer in the (home) Sites folder.
Pointing the Windows Mobile Phone to:
http://nn.nnn.nnn.nn.bredband.3.dk/ 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.
- 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.
Home computer: mac mini, snow leopard, internet connection over USB broadband
Phone: Samsung i780, os = Windows Mobile 6.0.
erik8085 — 2010-06-12T05:47:43-04:00 — #2
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 http://nn.nnn.nnn.nn.bredband.3.dk:3000
the browser responded: searching, opening.... TIMEOUT while processing
I tried external + user
Pointed to http://nn.nnn.nnn.nn.bredband.3.dk/~eriknnnn:3000
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
erik8085 — 2010-06-12T06:31:42-04:00 — #3
Right, turned off firewall and
IT all WORKS NOW
thanks a lot
(I will think about bringing the app into Apache server as you suggested)
downtroden — 2010-06-12T06:02:14-04:00 — #4
do by chance have the firewall on, blocking access to port 3000?
downtroden — 2010-06-11T14:27:00-04:00 — #5
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 http://nn.nnn.nnn.nn.bredband.3.dk:3000 from your phone/external machine. That'll use the mongrel server that rails runs on.
kabeerg512 — 2010-06-02T13:31:17-04:00 — #6
if you wanted to list only names and phone numbers, you could create phone.rhtml, accessible via http://localhost:3000/addresses/phone.
erik8085 — 2010-06-02T13:52:13-04:00 — #7
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