Use this command and follow the instructions:
bash -s stable --rails < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Other options include(any gems imply --ruby):
--ruby=1.9.3
--gems=rails,gist
Optionally on OSX install homebrew, use brew
command to install whatever database engine you need, ie brew install sqlite