views:

510

answers:

3

Hello guys, i've developed small web app for personal use with Ruby on Rails. Now when i want to use it I open Terminal and run ruby script/server to run mongrel then i go to Safari and type localhost:3000 to see my app.

I'd like to have this site start automatically on startup of mac and possibly to use some other URL.. preferably just http://myapp/

I come from C#/asp.net world and don't know much about apache/mongrel stuff.

Do you know any step by step tutorial how to configure rails/mongrel/apache on mac os x leopard to work together and run after startup, please? (I have apache running, which was done just by checking checkbox in system preferences/sharing)

+3  A: 

Hi Michal, This page by apple should have all the information you need: http://developer.apple.com/tools/deployonrailsleopard.html

yuval
I second this link! I used it to setup rails on a server last year. Unfortunately, this requires that you have Mac OS X Server - a beefier copy of Mac OS X with tools for running services. If you don't have a server, you might want to look into "Ruby on Rails hosting". A few web hosts offer paid plans where they'll host your app for a fixed price per month, and take care of the setup.
Ben Gotow
I use non Server version of Leopard on my laptop so this doesn't work for me. But thanks for your effort anyway
Michal
+2  A: 

The easiest method would be to install Passenger Phusion / mod_rails for Apache. This will allow you to use sidestep the usage of Mongrel/Thin/etc and deploy apps much like php (stick it in a folder and go).

Flemish Bee Cycle
+2  A: 

If you want to run it on Mac OS X you can simply setup your webserver, I recommend nginx with Phusion's Passenger, and your database server to start on boot, that way whenever your computer has to restart it will have your site running. Of course if this is a laptop that will be changing networks and needs to be accessed by other people I would recommend getting a proper VPS for it, come to think of it, I would recommend that anyway if this is supposed to be a production environment.

railsninja