How to work around the “no address associated with hostname.(SocketError)” when installing Rails
- 0 Comments
Google Query: gem install rails no address associated with hostname.(SocketError)
I was trying to install Rails the other day at work and they had just finished implementing some “new improved” firewall security rules. Well needless to say, this broke my ability to install Rails. Although, I didn’t realize this at first. I kept getting the following error when I tried to install Rails:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
getaddrinfo: no address associated with hostname.(SocketError)
After some investigating, it turned out that some ports were being blocked on the firewall that did not allow me to install Ruby gems directly from the repository with the gem command. After some googling, I found the easiest solution at Ashish Kulkarni’s Blog. Thanks Ashish!
Basically you do the following:
-Go to the rubyforge gems subdirectory and download the following:
-Now go to your command prompt and change to the directory where you downloaded the gems and execute the following:
- gem install activesupport
- gem install activerecord
- gem install actionwebservice
- gem install actionpack
- gem install actionmailer
- gem install rails
That’s it! Now when you are behind a pesky firewall and get this error, you can work around it! Happy Coding!
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.