Beware, hap hazard tech notes do follow:
So, warnings and precautions aside, it’s time to put down some notes on how to get going with ruby 2.0 and rails 4.0 in a new app. As of the start of these notes, ruby is 2.0.0-p195 and rails 4.0 is rc1.
The first step is to be wise and use a ruby version switcher such as rvm or rbenv. My preference is for rbenv, so the steps involved are using that.
Installing ruby 2.0
brew upgrade ruby-build
That will get you the latest ruby definitions for ruby and allow you to install them as part of rbenv.
rbenv install ruby-2.0.0-p195
If, for some reason you haven’t install openssl yet, that will complain. So, take two will involved
brew install openssl
Now, silly person, go and install ruby 2.0 via rbenv again.
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install ruby-2.0.0-p195
So, we are now good to go with ruby 2.0.0-p195. Let’s get rails 4.0 up and running and start building an app.
gem install rails --version 4.0.0.rc1 --no-ri --no-rdoc
Now. Make your rails app and remember to ‘Ship It!’