I'd suggest looking at this distribution which has a number of things stripped out that makes it a bit better suited to running a server. SSH is already running in it, so you can just SSH (pi/raspberry) in.
Remember to
sudo raspi-config
once you've got it installed on a card and running, and use the menu option for expanding out the root-fs to fill your card.
You may need to
sudo apt-get update
To get a list of latest packages and
apt-cache search curl
(curl or whatever package it doesn't find) before you
sudo apt-get install curl
Then the guide to setup Ruby on Rails should get you the rest of the way. I've done it successfully twice now, and it's pretty simple to google any errors you get and find the command you need to run to get over the hurdles.
But remember that it's going to take HOURS to install, and there's no messages for long stretches of time, so be patient.