Madison Rails
RoR Installation Cheat Sheet

Installation Cheat Sheet

Recently updated 9/12/2008

1) “Before you even become a Rails Dummy” go to the RoR site and get yer read on with Start At The Beginning

Finding Ruby on Rails

If you need to set up Ruby and you’re new to the whole thing, you’ll need some TLC, a good back-up of all your stuff, and an experienced RoR friend. If you’re brave and don’t mind giving it a try, keep reading. We, the Madison Rails peeps , will not be responsible for your botched installation. However, we’re a nice bunch of folks and like helping newbies so we’d recommend attending a Code and Coffee meeting before you start playing on the command line for the first time.

2)Install Ruby, Rails, WEBrick, Mongrel, etc,

Go find a nice RoR installation and download it. There are all kinds of ways to do this, here are a few:

3) Start your localhost

Usually Ruby on Rails runs off of Mongrel or WeBRICK LiteHTTP local servers routed to port 3000. This is standard. Advanced users will probably set-up virtual hosts in their Apache config (for now, don’t worry about it).

First, you’ll need to navigate to the directory in which your Rails App is installed. Mine’s on the root of my hard drive so I do the following on my crappy PC:

cd \rails_projects\NameOfMyApp

... hit enter, then type …

ruby script/server

It may take a few seconds but once your server has started, you can open your web browser and go to: http://localhost:3000

BAM! You’re Riding the Rails!

If you’re working on multiple RoR apps at the same time (‘cause you’re working on multiple projects or demos) you’ll need to run them on separate ports. Don’t ask what this means, just do this by opening a new Terminal window and type the following:

ruby script/server -p 3001

Now your “other” Ruby app will be available via the following URL: http://localhost:3001 Your Mongrel or WEBrick servers are currently running, so you’ll need to keep these Terminal or CMD windows open. If you close them, you’re toast and you’ll need to start over with a new CMD or Terminal windows and run the following command again (for each port you are running).

ruby script/server

If you need more info, Google it.

Other links to have as handy bookmarks:

Once you’re comfty starting your localhost server and looking at the basic “You’re Riding the Rails” index page, check out the Ruby on Rails-specific Command Line Cheat Sheets (Thanks Martin). If you’re interested, there is a high-level Command Line Cheat Sheet also available on this site as well which talks more about getting used to moved around and doing basic stuff on the command line.

You’ll also need A Decent Text Editor. This will always be a heated and opinionated topic, so feel free to talk about it on this wiki.