# Fixing Ruby's Invalid Option Error by Unsetting RUBYOPT

DevFeed: [Fixing Ruby's Invalid Option Error by Unsetting RUBYOPT](<https://devfeed.tech/articles/ruby-invalid-option-dash-colon-or-when-ruby-goes-insane-in-the-brain-28310.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/ruby/2020/03/24/ruby-invalid-option-or-when-ruby-goes-insane-in-the-brain.html>)

Author: Fuzzygroup

Published: 2020-03-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Jekyll](<https://devfeed.tech/topics/jekyll.md>)

Tags: [jekyll](<https://devfeed.tech/tags/jekyll.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

## AI overview

This short troubleshooting post explains how an unexpected Ruby "invalid option -:" error prevented a Jekyll post from being created. Unsetting the RUBYOPT environment variable resolved the issue.

## Source excerpt

This is a short one but a weird one. My main box rebooted today and when I went to create a blog post, I got this madness: ❯ jekyll post "A Social Media Marketing Strategy that Mom Would Approve" ruby: invalid option -: (-h will show valid options) (RuntimeError) In all my years of ruby, I've never seen -:. All the normal jiggery pokery of: which ruby rvm list etc failed to give me any insights. I finally found the answer on an obscure Github issue that said "unset RUBYOPT" so: ❯ unset RUBYOPT And that gave me back: blog on  gh-pages [🤷] via 💎 v2.3.1 on ☁ us-west-2 ❯ ruby --version ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16] blog on  gh-pages [🤷] via 💎 v2.3.1 on ☁ us-west-2 ❯ jekyll post "A Social Marketing Strategy that Mom Would Approve" New post created at _posts/2020-03-24-a-social-marketing-strategy-that-mom-would-approve.md. And now, once again, I can (joyfully) write!