Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

"Ruby environment not found" when trying to create a node.js theme app extension

Shopify Partner
9 0 3

This is my first time building a shopify custom app.
I'm following the guide documented here:


The first step was to run: 


npm init @shopify/app@latest

I chose 'node' as my platform.

When complete, if i run:

npm run dev

the app starts fine.


However, if i try creating a theme app extension, by running:

npm run generate extension

and choosing 'theme app extension', it creates the extension folder under my project.

If i run the application again (using the same run command as before), I receive an error:

I'm not building a ruby project.  What am i missing or doing wrong?

Replies 7 (7)

Shopify Staff
1244 201 440

Hi @emalueg - thanks for getting in touch, this is for sure odd. My understanding is that Ruby is used as a dependency for many CLI based projects, even if you're running it through NPM. I'd recommend following the URL from the error message that's surfaced by the CLI and see if the issue is resolved after you've installed Ruby. 


If the error persists, please reach out in our repo for the CLI itself here by opening an issue and we can help you out further that way. Hope this helps!


Al | Shopify Developer Support 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog

Shopify Partner
164 2 51

Did you find the solution? I have a php based app and getting the same error.

Try the best recent order app for Shopify free for 7 days:
Shopify Partner
9 0 3

Unfortunately, "Install Ruby".
It doesn't seem right to me, but something in the CLI setup depends on Ruby...

Shopify Partner
164 2 51

Yeh unfortunately Ruby is a requirement for the CLI. It also needs to be 2.7 which is not available by default in most packages so it's a bit of a pain to install.

Ruby currently doesn't work at all on Win11 ARM64.

Theme extensions are pretty neat but uploading/updating them via GIT and running the validation on the Shopify's side would have been a better solution, oh well.

Try the best recent order app for Shopify free for 7 days:
Shopify Partner
2 0 0

Linux machine has Ruby 3.2.2 installed.



However when executing Shopify CLI commands, it is not recognizing the version and is throwing an error.


Please help me in addressing this issue

Shopify Partner
2 0 0

I'm also facing the same issue. I have installed the latest ruby version in my system and still it's not recognizing and throwing the same error

2 0 0

If you're using vscode, close the program, reopen it, then run ruby -v to verify that it's installed. Worse case scenario, restart system due to installing a new program.