cli: [Bug]: Ruby version not supported

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

App, Extension

Expected behavior

Running yarn dev on an app should start development mode

Actual behavior

Running yarn dev briefly starts development mode, but fails with an error after a few seconds:

Ruby version 2.6.10 is not supported Make sure you have at least Ruby 2.7.5 installed on your system. Documentation.

I uninstalled Shopify CLI and re-installed using brew, since Shopify states it will install the required Ruby version, but still no luck. I also cannot upgrade the system Ruby.

Verbose output

Not really sure what to put here. I ran it with `--verbose` but it just output tons of info (100s and 100s of lines that seemed unrelated).

Reproduction steps

  1. In an app, run yarn dev

Operating System

Mac OS Ventura 13.6.1

Shopify CLI version (check your project’s package.json if you’re not sure)

3.56.3

Shell

No response

Node version (run node -v if you’re not sure)

v18.19.0

What language and version are you using in your application?

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@adamchipperfield Did you discover a fix? having similar issue

@bansavage No. It’s extremely frustrating and clearly not an isolated issue to me (since I’ve had it on multiple machines and you are having the issue).

Really surprised to see this issue closed for something we’re expected to learn and implement by August.

Cheers for the update! I’ve updated to the latest version and now I’m getting this issue when working with themes, so it’s completely debilitating.

Then reinstall the CLI.

Could you show exactly how we’d do this ^ please?

Hey Adam! I ran into the same issue today after trying to develop a simple app, while my usual work is as a theme dev. What I believe was happening is that the Ruby version on my M1 mac was overriding the one I installed using rbenv, so even after setting the local and global version to 3.3.0, using ‘ruby -v’ still showed 2.6.1

What fixed it for me was to change to the Homebrew installed version by changing the path: echo ‘export PATH=“/usr/local/opt/ruby/bin:$PATH”’ >> ~/.zshrc

Then applying the changes using: source ~/.zshrc

Now running ‘ruby -v’ on my project terminal shows 3.3.0. Hopefully that does it for you, its very frustrating, I know.

Had the same problem, fixed it by running the following commands. Thanks @MauroLZ! echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc source ~/.zshrc

When you install Shopify CLI using Homebrew, Homebrew installs Node.js, Ruby, and Git for you.

That’s what I was looking for @bansavage! It’s suggested that it’s all handled for you.

Managed to sort my Ruby version, but now getting this error around “Bundler”:

image

I’ve tried running gem install bundler but I get this error: image

This is really frustrating, because I’m not that familiar with Ruby and Shopify CLI should be handling all this AFAIK.

I’ve tried this on a few different apps and getting the same, so it’s not a code base issue.