没有不值得去解决的问题,也没有不值得去学习的技术!

Install Shopify CLI on Windows 10 Pro With Ruby via RubyInstaller for Windows

To install Shopify CLI, run the command: gem install shopify-cli

1. To install and run Shopify CLI, you need the following software installed on your computer: Ruby or Ruby+Devkit using RubyInstaller for Windows version 2.7+, and Git. Reference: https://shopify.dev/themes/getting-started/create#step-1-install-shopify-cli . See Figure 1.

To install and run Shopify CLI, you need the following software installed on your computer: Ruby or Ruby+Devkit using RubyInstaller for Windows version 2.7+, and Git.
Figure 1

2. Git is already installed on the computer, but Ruby is not. I ultimately decided to install Ruby+Devkit 3.1.X (x64) by downloading and running rubyinstaller-devkit-3.1.1-1-x64.exe. See Figure 2.

Git is already installed on the computer, but Ruby is not. I ultimately decided to install Ruby+Devkit 3.1.X (x64) by downloading and running rubyinstaller-devkit-3.1.1-1-x64.exe
Figure 2

3. To install Shopify CLI, run the command: gem install shopify-cli. See Figure 3.

To install Shopify CLI, run the command: gem install shopify-cli
Figure 3
Plaintext

PS C:\Windows\system32> gem install shopify-cli
Fetching ast-2.4.2.gem
Fetching parser-3.1.2.0.gem
Fetching nokogiri-1.13.4-x64-mingw-ucrt.gem
Fetching liquid-5.3.0.gem
Fetching theme-check-1.10.2.gem
Fetching ffi-1.15.5-x64-mingw-ucrt.gem
Fetching rb-inotify-0.10.1.gem
Fetching rb-fsevent-0.11.1.gem
Fetching shopify-cli-2.15.6.gem
Fetching listen-3.7.1.gem
Fetching concurrent-ruby-1.1.10.gem
Fetching bugsnag-6.24.2.gem
Successfully installed ast-2.4.2
Successfully installed parser-3.1.2.0
Successfully installed nokogiri-1.13.4-x64-mingw-ucrt
Successfully installed liquid-5.3.0
Successfully installed theme-check-1.10.2
Successfully installed ffi-1.15.5-x64-mingw-ucrt
Successfully installed rb-inotify-0.10.1
Successfully installed rb-fsevent-0.11.1
Successfully installed listen-3.7.1
Successfully installed concurrent-ruby-1.1.10
Successfully installed bugsnag-6.24.2
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
Successfully installed shopify-cli-2.15.6
Parsing documentation for ast-2.4.2
Installing ri documentation for ast-2.4.2
Parsing documentation for parser-3.1.2.0
Installing ri documentation for parser-3.1.2.0
Parsing documentation for nokogiri-1.13.4-x64-mingw-ucrt
Installing ri documentation for nokogiri-1.13.4-x64-mingw-ucrt
Parsing documentation for liquid-5.3.0
Installing ri documentation for liquid-5.3.0
Parsing documentation for theme-check-1.10.2
Installing ri documentation for theme-check-1.10.2
Parsing documentation for ffi-1.15.5-x64-mingw-ucrt
Installing ri documentation for ffi-1.15.5-x64-mingw-ucrt
Parsing documentation for rb-inotify-0.10.1
Installing ri documentation for rb-inotify-0.10.1
Parsing documentation for rb-fsevent-0.11.1
Installing ri documentation for rb-fsevent-0.11.1
Parsing documentation for listen-3.7.1
Installing ri documentation for listen-3.7.1
Parsing documentation for concurrent-ruby-1.1.10
Installing ri documentation for concurrent-ruby-1.1.10
Parsing documentation for bugsnag-6.24.2
Installing ri documentation for bugsnag-6.24.2
Parsing documentation for shopify-cli-2.15.6
Installing ri documentation for shopify-cli-2.15.6
Done installing documentation for ast, parser, nokogiri, liquid, theme-check, ffi, rb-inotify, rb-fsevent, listen, concurrent-ruby, bugsnag, shopify-cli after 61 seconds
12 gems installed

4. In the terminal, navigate to the working directory where you want to clone Dawn. Enter the following command. Confirm that Shopify CLI is installed correctly. See Figure 4.

In the terminal, navigate to the working directory where you want to clone Dawn. Enter the following command. Confirm that Shopify CLI is installed correctly
Figure 4
Plaintext

PS E:\wwwroot>
┏━━ Cloning https://github.com/Shopify/dawn.git into dawn-20220420-1… ━━━━━━━━━
┃                                                                           100%
┗━━ √ Cloned into dawn-20220420-1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (17.06s) ━━━
PS E:\wwwroot>
PS E:\wwwroot>
PS E:\wwwroot> shopify theme init
? Theme name
> dawn-20220420-1



5. Enter the directory: dawn-20220420-1, and view the file list. See Figure 5.

Enter the directory: dawn-20220420-1, and view the file list
Figure 5
Plaintext
PS E:\wwwroot> cd .\dawn-20220420-1\
PS E:\wwwroot\dawn-20220420-1> ls


    目录: E:\wwwroot\dawn-20220420-1


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2022/4/20      9:34                .vscode
d-----         2022/4/20      9:34                assets
d-----         2022/4/20      9:34                config
d-----         2022/4/20      9:34                layout
d-----         2022/4/20      9:34                locales
d-----         2022/4/20      9:34                sections
d-----         2022/4/20      9:34                snippets
d-----         2022/4/20      9:34                templates
-a----         2022/4/20      9:34            127 .gitignore
-a----         2022/4/20      9:34             76 .theme-check.yml
-a----         2022/4/20      9:34           1423 LICENSE.md
-a----         2022/4/20      9:34           7187 README.md
-a----         2022/4/20      9:34           3521 release-notes.md
-a----         2022/4/20      9:34            691 translation.yml


PS E:\wwwroot\dawn-20220420-1>


关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系