Error C:/Ruby30-x64/lib/ruby/3.0.0/open3.rb:221:in `spawn': No such file or directory - git (Errno::

Topic summary

A user encounters an Errno::ENOENT error when running Shopify CLI commands on Windows with Ruby 3.0. The error trace indicates the system cannot find Git (No such file or directory - git), which is required by the Shopify CLI.

Root Cause:
The Shopify CLI is attempting to execute Git commands, but Git is either not installed or not accessible in the system PATH.

Proposed Solution:
Another Windows user reported resolving a similar issue by:

  • Uninstalling all Ruby installations
  • Reinstalling Ruby using winget install RubyInstallerTeam.RubyWithDevKit
  • Following the official Ruby installation documentation

Status:
The discussion remains open with limited detail on whether installing Git separately (in addition to Ruby reinstallation) is necessary. The corrupted/reversed text in some posts suggests formatting issues that may obscure additional troubleshooting steps.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

When I hit shopify command, I get following error

C:/Ruby30/lib/ruby/3.0.0/open3.rb:221:in spawn': No such file or directory - git (Errno::ENOENT) from C:/Ruby30/lib/ruby/3.0.0/open3.rb:221:in popen_run’
from C:/Ruby30/lib/ruby/3.0.0/open3.rb:102:in popen3' from C:/Ruby30/lib/ruby/3.0.0/open3.rb:289:in capture3’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/system.rb:194:in delegate_open3' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/system.rb:90:in capture3’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/context.rb:493:in capture3' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/git.rb:142:in exec’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/git.rb:148:in rev_parse' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/git.rb:24:in sha’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli.rb:178:in sha' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/api.rb:113:in default_headers’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/api.rb:57:in block in request' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/util.rb:172:in retry_after’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/api.rb:89:in request' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/api.rb:37:in query’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/partners_api.rb:39:in block in query' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/util.rb:172:in retry_after’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/partners_api.rb:40:in query' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/partners_api/organizations.rb:6:in fetch_all’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/tasks/select_org_and_shop.rb:28:in organizations' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/tasks/select_org_and_shop.rb:39:in get_organization’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/tasks/select_org_and_shop.rb:11:in call' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/task.rb:7:in call’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/project_types/rails/forms/create.rb:25:in ask' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/form.rb:13:in ask’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/project_types/rails/commands/create.rb:34:in call' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/sub_command.rb:13:in call’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/command.rb:19:in call' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/core/executor.rb:17:in block (2 levels) in call’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:37:in block (2 levels) in with_logging' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb:169:in with_id’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:36:in block in with_logging' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-ui/lib/cli/ui.rb:176:in log_output_to’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:35:in with_logging' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/core/executor.rb:16:in block in call’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:45:in block (2 levels) in with_traps' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:51:in twrap’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:44:in block in with_traps' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:51:in twrap’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/executor.rb:43:in with_traps' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/core/executor.rb:15:in call’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/core/entry_point.rb:24:in block in call' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/core/monorail.rb:30:in log’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/lib/shopify_cli/core/entry_point.rb:23:in call' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/bin/shopify:37:in block (2 levels) in ’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:in handle_abort' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:21:in call’
from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/bin/shopify:36:in block in <main>' from C:/Ruby30/lib/ruby/gems/3.0.0/gems/shopify-cli-2.6.4/bin/shopify:47:in

I am a Windows system and I have encountered the same problem。

I uninstalled all Ruby and then reinstalled Ruby using the method provided in the link below, it`s work,

https://www.ruby-lang.org/en/documentation/installation/

winget install RubyInstallerTeam.RubyWithDevKit.3.2
winget install RubyInstallerTeam.RubyWithDevKit.3.0

sorry, version3.0,not 3.2,3.2 not verify