0

I am trying to install a ruby gem called shopify_theme which lets you locally push edits to the main folder of a shopify server using their api key.

Whilst trying to download the theme to my hardrive via command line I got this error:

/Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:762:in `initialize': getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:762:in `open'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:762:in `connect'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:744:in `start'
from /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/http.rb:1284:in `request'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/httparty-0.9.0/lib/httparty/request.rb:81:in `perform'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/httparty-0.9.0/lib/httparty.rb:438:in `perform_request'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/httparty-0.9.0/lib/httparty.rb:385:in `get'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/shopify_theme-0.0.7/lib/shopify_theme.rb:10:in `asset_list'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/shopify_theme-0.0.7/lib/shopify_theme/cli.rb:30:in `download'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/shopify_theme-0.0.7/bin/theme:24:in `<top (required)>'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/theme:19:in `load'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/theme:19:in `<main>'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `<main>'

Are there any ruby experts out there that would happen to know what this error is and how I could go about it in a different manner?

Cheers, Mark

M dunbavan
  • 1,157
  • 5
  • 22
  • 57
  • 1
    You either dont have internet connection, or are trying to load a url that doesn't exist somehow. Open `/Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/shopify_theme-0.0.7/lib/shopify_theme.rb:10` and see what server it's trying to connect to? – Alex Wayne Oct 16 '12 at 18:34
  • sorry bit of a retarded question but should I cd to that? How else can i open that otherwise? – M dunbavan Oct 16 '12 at 18:45
  • `open /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/shopify_theme-0.0.7/lib/shopify‌​_theme.rb` – Alex Wayne Oct 16 '12 at 18:58
  • ah ha that opened fine. There is a good internet connection so not sure what it could be? – M dunbavan Oct 16 '12 at 19:19
  • _and see what server it's trying to connect to?_ Does the server exists? is the URL valid? Is it pulling from some config somewhere that is misconfigured? Are you loading a theme from some random dude that is years old and points to a server that is now offline? This could be a million things. This isn't a ruby problem. You have something somewhere that is trying to load bad URL, and that URL happens to be being loaded with ruby. – Alex Wayne Oct 16 '12 at 19:24
  • it might be the fact that i am loading a url starting with https://, this is a secure server so what might be happening is the socket error might be the https:// request blocking it from allowing a connection. There is a config.yml file that contains the information in a theme folder locally which is created. To create that I use $ theme configure api_key password theme_url. This creates the config file with the url and then I use command theme download whilst cd'd into that folder!! – M dunbavan Oct 16 '12 at 19:37
  • 2
    This is dodging the question a bit, but give the [Shopify Theme Sync App](http://wiki.shopify.com/Theme_Sync_App) a go instead assuming you're on a Mac. – David Underwood Oct 16 '12 at 20:12
  • this looks good but all I got as a readme file in the app folder? – M dunbavan Oct 16 '12 at 20:35
  • Can you post your config file? – John Duff Oct 19 '12 at 13:32
  • Hey Guys, I found a better way of doing all this. Thanks for the help. – M dunbavan Oct 21 '12 at 13:35

0 Answers0