我按照 shopify 網站上的說明進行操作,一切似乎都安裝正確……直到我嘗試確認 shopify version
這是cmd輸出:
C:\WINDOWS\system32>gem install shopify-cli
Fetching shopify-cli-2.7.4.gem
Successfully installed shopify-cli-2.7.4
Parsing documentation for shopify-cli-2.7.4
Installing ri documentation for shopify-cli-2.7.4
Done installing documentation for shopify-cli after 3 seconds
1 gem installed
C:\WINDOWS\system32>shopify version
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/os.rb:15:in `current': Could not determine OS from platform x64-mingw-ucrt (RuntimeError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:13:in `<module:Spinner>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:6:in `<module:UI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:5:in `<module:CLI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:4:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:9:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui.rb:19:in `<module:UI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui.rb:2:in `<module:CLI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui.rb:1:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:9:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/lib/shopify_cli.rb:24:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:9:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/load_shopify.rb:18:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:32:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:32:in `<top (required)>'
from C:/Ruby31-x64/bin/shopify:25:in `load'
from C:/Ruby31-x64/bin/shopify:25:in `<main>'
任何幫助是極大的贊賞
uj5u.com熱心網友回復:
好像是個bug。你應該在他們的 Github 頁面上報告它,但同時你可以自己修復它:
在您的編輯器中打開檔案:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/os.rb
找到以下行(第 12 行左右):
when /mingw32/
Windows
將其更改為:
when /mingw/
Windows
現在再試一次。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/401937.html
