0

您好,我正在尝试使用 shopify_theme gem 来管理本地 shopify 开发并利用版本控制,但是我不断收到以下错误。我已经查看了 shopify 的 API 文档以及主题 gem repo 上的自述文件,但似乎无法让它工作......

(这里的 github 仓库:https ://github.com/Shopify/shopify_theme )

Kenneths-MacBook-Pro:anglersden kennethprince$ theme configure xxxxxxxxxxxAPIKEYxxxxxxxxxxxxx PASSWORDETC https://xxxxxxxAPIKEYxxxxxxxxxxxx@TESTSTORE.myshopify.com/admin
  create  config.yml

Kenneths-MacBook-Pro:anglersden kennethprince$ 主题下载

/Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:141:in

`read_nonblock': 对等点重置连接 (Errno::ECONNRESET)

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1316:in `catch'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1293:in `request'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:745:in `start'

from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1284:in `request'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/httparty-0.9.0/lib/httparty/request.rb:81:in `perform'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/httparty-0.9.0/lib/httparty.rb:438:in `perform_request'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/httparty-0.9.0/lib/httparty.rb:385:in `get'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/shopify_theme-0.0.7/lib/shopify_theme.rb:10:in `asset_list'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/shopify_theme-0.0.7/lib/shopify_theme/cli.rb:30:in `download'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/gems/shopify_theme-0.0.7/bin/theme:24:in `<top (required)>'

from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/bin/theme:19:in `load'
from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/bin/theme:19:in `<main>'
from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/kennethprince/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'

我还尝试使用 API 连接到商店,请参见下面的代码。

Kenneths-MacBook-Pro:anglersden kennethprince$ irb
1.9.3-p327 :001 > require 'rubygems'
 => false 
1.9.3-p327 :002 > true
 => true 
1.9.3-p327 :003 > require 'rubygems'
 => false 
1.9.3-p327 :004 > require 'rubygems' true
SyntaxError: (irb):4: syntax error, unexpected keyword_true, expecting $end
    from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/bin/irb:16:in `<main>'
1.9.3-p327 :005 > true
 => true 
1.9.3-p327 :006 > require 'rubygems'
 => false 
1.9.3-p327 :007 > require 'shopify_api'
LoadError: cannot load such file -- shopify_api
    from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from (irb):7
    from /Users/kennethprince/.rvm/rubies/ruby-1.9.3-p327/bin/irb:16:in `<main>'
1.9.3-p327 :008 > puts RUBY_VERSION
1.9.3
 => nil 
1.9.3-p327 :009 > 
4

1 回答 1

0

这是我在 Mac 上安装 ruby​​ 的方式的问题。安装新硬盘后,我安装了 RVM 和 Homebrew,一切正常。

于 2014-05-28T02:09:21.743 回答