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.
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 (because you’re oh, so cool ‘cause you’re pulling code back and forth) 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 servers are running, so you’ll need to keep these CMD windows open. If you close them, you’re toast and you’ll need to start over with a new CMD or Terminal window.
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 Command Line Cheat Sheet
You’ll also need A Decent Text Editor. This has been a heated topic lately, so feel free to talk about it on this wiki (just click on the ”?” above.