I installed shopify-cli
using homebrew
on my Mac and tried verifying the installation by running shopify version
, but I get an error:
/usr/local/bin/shopify: line 2: /opt/homebrew/Cellar/ruby/3.0.1/bin/ruby: No such file or directory
Any idea what needs to be fixed?
2
Answers
It appears that
shopify-cli
was installed when your Homebrewruby
was at version 3.0.1. This can be fixed by running the following command:(Ideally, the
shopify-cli
formula should be updated by its maintainers to replace hardcodedruby
paths to the version-agnostic/opt/homebrew/opt/ruby
. Alternatively, they could track the Homebrewruby
version and bump the revision ofshopify-cli
whenever an update occurs. This will prompt end-users to runbrew upgrade
, which will automatically reinstallshopify-cli
.)Try running
brew install [email protected]
. It worked for me!