Gem installation

sorry to bring this up, but i’m trying to install gems but am having
inconsistent results. Some do, some don’t. I’ve tried setting the http
env variable and using -p to account for proxy setting. still get
ERROR: While executing gem…(Gem::RemoteFetcher::Fetcherror)
getaddrinfo: no address associated with hostname. (SocketError)

I’m obviously new and googled my brains out, but can’t seem to bring
things together.

Any suggestions would be greatly appreciated