Update: I found almost exact similar question, yet it has slightly different prerequisites and thus doesn\'t help much.
Given:
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.