I am trying to follow the documentation and recommended tools and install process for the Shopify CLI on Windows at https://shopify.dev/themes/tools/cli/install
I am showing in my CMD prompt that I have:
Node: 18.12.1
NPM: 9.4.0
Ruby: 3.1.3p185
Bundler: 2.4.5
Shopify CLI: 3.37.0
Some of my Shopify CLI commands work as expected, but others such as “shopify theme dev” seem to stall without giving an error. Running in verbose mode, I see that all of the stalling occurs around “bundle exec” lines in the script, for example:
bundle exec shopify theme serve . --theme mytheme --live-reload hot-reload
Running this line directly in my CLI gives me the error:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.4.5/lib/bundler/rubygems_integration.rb:304:in `block in replace_bin_path': can't find executable shopify for gem shopify-cli. shopify-cli is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.4.5/lib/bundler/rubygems_integration.rb:332:in `block in replace_bin_path'
I have tried adding shopify-cli to my Gemfile, however, it does not appear to be available beyond 2.34, as indicated at https://rubygems.org/gems/shopify-cli
This would seem to indicate that any syntax specific to version 3.x of the CLI cannot be run by Bundler until the Gem is updated. Would there be another way to address this for my Windows build?
I have cleaned up some packages so Bundler appears to be running version 3.38.0 of Shopify CLI, however, I am continuing to have the CLI stall on some commands, for example:
Command:
shopify theme pull -d --verbose
Result: Execution stalls at
2023-01-26T23:32:58.863Z:
Running system process:
· Command: bundle exec shopify theme pull c:/xampp/htdocs/mydir --development
· Working directory: c:\xampp\htdocs\mydir
and
Command:
shopify theme dev -t mytheme --verbose
Result: Execution stalls on:
2023-01-26T23:36:28.378Z:
Running system process:
· Command: bundle exec shopify theme serve . --theme mytheme --live-reload hot-reload
· Working directory: c:\xampp\htdocs\mydir
Thanks for any guidance on why these Bundler commands are stalling and advice on how to resolve them.
I have resolved the issue by uninstalling/reinstalling Ruby for Windows, starting a new directory for my theme setup, and skipping the install steps under Getting Started at https://bundler.io/. These steps do not appear necessary and appear to possibly create conflicts since “bundle install” appears to be executed automatically in the Shopify CLI scripts.
1 Like
Thank you so much ?
,
I tried dozens of suggestions for 2 days, but only your solution worked. I never thought it was as simple as that.
Looks like a compatibility issue with Bundler and Shopify CLI. Debugging this is like timing window cleaning services on a sunny day try npx shopify or check for Gem updates.