'shopify theme dev' fails installing theme dependencies

'shopify theme dev' fails installing theme dependencies

Shopify Partner
1 0 1

I followed the Shopify CLI guideline for themes, as usual, and got stuck after the 'shopify theme dev'. It should upload the current theme to a store so I can preview it, but, instead I get this error (here's a snippet).


        throw ex;

ExternalError: Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.


I am working on Mac OS Venutra,  with Shopify 3.43.0 and node.js v19.6.0


Someone knows what is going on? This has happened all of a sudden

Replies 8 (8)

Shopify Partner
627 49 87

hello there 


The error message suggests that there is an issue with building the native extension for a gem, which may be causing the bundle install command to fail. Here are some troubleshooting steps you can try:

  1. Check if all the required dependencies for building the native extensions are installed on your system. Depending on the gem, you may need to have certain tools or libraries installed. You can check the gem's documentation or the error message for more information.

  2. Try running bundle install directly in your theme directory to see if it produces a more informative error message.

  3. If the problem persists, you can try deleting the Gemfile.lock file in your theme directory and running bundle install again. This will force the bundler to rebuild the dependencies from scratch.

  4. You can also try updating your Ruby installation and installing the bundler gem, as the issue may be related to the version of Ruby or bundler.


If this fixed your issue, likes and accepting as a solution are highly appreciated.

Build an online presence with our custom built Shopify Theme EcomifyTheme

Shopify Partner
3 0 3

Hello, when I run `bundle install`, give an error-`Could not locate Gemfile`.

Get Quick Response via Email
Shopify Partner
3 0 0

I have the same error, did you find the solution?

Shopify Partner
3 0 1

I'm also getting same error

did you find any solution? 



Shopify Partner
3 0 1

I'm also getting this same error


Shopify Partner
5 0 3

Hello @claralayti 

Did you find any solution for this? I am getting this same error. 

Please help me if you find any solution. 


Thank you!

Shopify Partner
3 0 1

If you have found any solution, can you please share with me

Thank You



Shopify Partner
41 8 20

For me, this did the trick...


Open Terminal and run

xcode-select --install

A popup dialogue box will open (Might be hidden behind other windows). Click "Install" and install the Command Line Tool Package.


If this doesn't work, also run

sudo xcode-select --reset


(You don't need to have Xcode installed to do all that)

If you find my suggestions helpful, kindly express your feedback by liking or marking them as a solution.