So, i just upgraded my ruby to 1.9.3, and installed the latest gem version 1.8.4.
After installing DevKit and everything i tried to install rails on my system. I wrote
gem install rails
and after a second got this error
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: No such host is known. (http://rubygems.org/latest_specs.4.8.gz)
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: Possible alternatives: rails