Issue with shopify theme dev command - Invalid option -A in Ruby

Shopify Partner
1 0 1

I am encountering an issue with the "shopify theme dev" command in the Shopify CLI tool, and I am seeking assistance to resolve it.

Whenever I attempt to run the "shopify theme dev" command to set up a local server for previewing changes on my Shopify theme, I receive the following error message:

ruby: invalid option -A (-h will show valid options) (RuntimeError)


It's worth noting that all other commands in the Shopify CLI tool are functioning as expected. However, this specific command consistently produces the mentioned error.

Here are the versions of the relevant tools I am using:
- Node.js: 20.12.1
- Ruby: 3.2.3
- Bundler: 2.5.7

In my attempts to troubleshoot the issue, I have taken the following steps:
- Verified that I am using the latest version of the Shopify CLI tool.
- Reviewed the documentation for the "shopify theme dev" command to ensure correct usage.
- Attempted to uninstall and reinstall both Node.js and Ruby.
- Tried downgrading Ruby to version 3.1.4.
Checked environmental variables to ensure they are properly configured.

Despite these efforts, I have been unable to resolve the issue. I suspect there may be a bug or an issue with the configuration of the command.

Reply 1 (1)

Shopify Partner
2 0 0

I have the same issue

ruby: invalid option -P  (-h will show valid options) (RuntimeError)

And did the same as you tried to gigure it myself but no luck