getaddrinfo: nodename nor servname provided, or not known (SocketError)

user1821591 picture user1821591 · Nov 13, 2012 · Viewed 8.6k times · Source

I'm developing a Shopify theme and I'm using https://github.com/Shopify/shopify_theme to update my files into Shopify. Unfortunately, I can't get it to work... When I try to upload/update a file, I get an error like...

.....ruby/1.9.1/net/http.rb:762:in `initialize': getaddrinfo: nodename nor servname provided, or not known (SocketError)

I already saw this error while trying to install gems, apparently it's a "typical" problem with MacOS. I fixed the problem by changing my router DNS to Google's ones (mac dns look up misbehaving).

Unfortunately, the same problem appears while trying to use the gem (Shopify_theme) I installed. I'm quite new to this gem/rails world, so I don't really know how to fix this.

Any idea out there?

EDIT: My bad, I actually found the solution. Sorry for this post, at least I'll explain how I fixed it.

I looked at the source files of this shopify_theme gem, and notice that it prepends "http://" before the shop url (defined with "theme configure api_key password store_url"). Because I first defined store_url WITH http://, this error shows up. If you get the same error, try to edit your config.yml file and remove "http://".

Answer

Edward Ocampo-Gooding picture Edward Ocampo-Gooding · Nov 14, 2012

(Answering here so the thread appears answered.)

“I looked at the source files of this shopify_theme gem, and noticed that it prepends "http://" before the shop url (defined with "theme configure api_key password store_url").

Because I first defined store_url WITH http://, this error shows up. If you get the same error, try to edit your config.yml file and remove "http://".”