Error: You cannot use gems with Shopify CLI

Viewed 2891

I am new to Shopify theme development. Currently following the tutorial by Shopify. Everything was going smoothly but I am getting the following error every time I run "Shopify theme serve":

[Note] You cannot use gems with Shopify CLI.
[LoadError] cannot load such file -- wdm
       They are disabled.
       Please don't modify the CLI locally.
       If you would like to contribute to the CLI project, please refer to
       https://github.com/Shopify/shopify-cli/blob/main/.github/CONTRIBUTING.md

  Please add the following to your Gemfile to avoid polling for changes:
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?
X You are not authorized to edit themes on banana-man-co.myshopify.com.
Make sure you are a user of that store, and allowed to edit themes.

Also, I know it says I am not authorized to edit themes but I am pretty sure that I am logged in as the admin. Anybody know how to fix this?

2 Answers

Run

gem install wdm

on the command prompt.

Then you won't see this issue but still see

X You are not authorized to edit themes on banana-man-co.myshopify.com.
Make sure you are a user of that store, and allowed to edit themes.

Follow Caution section on https://shopify.dev/themes/tools/cli/getting-started.

For arch linux where shopify-cli is installed using:

gem install shopify-cli

You need to install the Bundler:

gem install bundler

See more details in archlinux ruby wiki. Hope this helps someone.

Related