Update: I found almost exact similar question, yet it has slightly different prerequisites and thus doesn\'t help much.
Given:
only rvm reinstall all --force
helped me
Other solution would be using http://railsinstaller.org it already provides everything compiled for Ruby and Rails, I was working hard to solve all the libraries compilation and provide one package.
RVM has issues with readline installed via homebrew. This gist worked perfectly for me:
$ rvm get latest
$ rvm pkg install readline
$ rvm install 1.9.3 --with-readline-dir=$rvm_path/usr
Instead of install
you can use reinstall
.