gem install railsThe problem is that the actionpack requires precisely 1.0.0 version of rack gem. To get rid of this error just do what "actionpack" want ;-)
ERROR: Error installing rails:
actionpack requires rack (~> 1.0.0, runtime)
gem install rack --version 1.0.0
That's all, now you can simply install rails us usual without any errors.