【问题标题】:Trying to use line comand in gem: gem install shopify_theme尝试在 gem 中使用 line 命令:gem install shopify theme
【发布时间】:2015-04-17 18:41:33
【问题描述】:

我是 ruby​​ 新手,正在尝试使用 line 命令:

gem install shopify_theme

但是,我得到一个错误

NameError: undefined local variable or method 'shopify_theme' for main:Object
from <rb>:2
from C:/Ruby21/bin/irb:11:in '<main>'

我认为这与我的本地文件有关?我使用 Dir.chdir 来定位我的文件夹。另外,我这里也有 gem 文件。

参考:https://github.com/Shopify/shopify_theme

非常感谢您的帮助!

【问题讨论】:

  • 该命令应该从命令行 (cmd.exe) 运行,而不是从 Ruby 中运行。

标签: ruby gem shopify


【解决方案1】:

您可能在 ruby​​ 控制台中。退出 ruby​​ 控制台并使用 cmd.exe!

【讨论】:

  • 您好,感谢您的帮助!我切换到命令提示符,现在我收到此消息:C:\Windows\system32&gt;gem install shopify_theme ERROR: Could not find a valid gem 'shopify_theme' (&gt;= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://api.rubygems.org/latest_specs.4.8.gz) C:\Windows\system32&gt;
  • 您似乎没有有效的 SSL 证书。继续github.com/Shopify/shopify_theme 并向下滚动到“常见问题”部分,您可能会找到解决问题的方法。
  • 更准确地说,该错误消息意味着 api.rubygems.org 没有有效的 SSL 证书。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-11-09
  • 2011-01-08
相关资源
最近更新 更多