Ruby 3.2.2 Error : invalid option -O (-h will show valid options)

I am currently encountering an issue with Ruby within the context of Shopify development.

Despite attempting some previously suggested solutions, none of them have resolved my problem.

I have updated Ruby to the latest version, as well as the Shopify CLI on my Windows 10.

However, the error persists:

ruby: invalid option -O (-h will show valid options) (Runtime Error)

f anyone has encountered a similar issue or possesses knowledge about this specific error, your guidance would be highly valuable.

Same issue here. I get that error after remix run dev starts on extensions. Did you solve the issue?

Running on Win 11

Ruby 3.0.6

Shopify CLI 3.53.0

Yes, i just changed the project directory to the desktop folder, it seems like a dumb solution but its worked, how? idk

Yes, I figured it out. It turns out that this happens when the directory name has a space anywhere in the path.

Our case was with letter O after the space, but it could have been any character really depending on the name of the folder.

1 Like