`ruby.exe: invalid option -V` due to bad `RUBYOPT` and `VAGRANT_RUBYOPT_SAVED`

17 views
Skip to first unread message

Torben Knerr

unread,
Jun 14, 2013, 1:23:54 PM6/14/13
to vagra...@googlegroups.com
When using Vagrant for a while I get this strange error message:

```
D:\Repos\_github\cookbooks-gitlab>bundle exec berks install --path cookbooks
ruby.exe: invalid option -V  (-h will show valid options) (RuntimeError)
```

I can't reliably reproduce it, it just happens sometimes.

However, the problem occurs as soon as the `RUBYOPT` env var gets set to a bad value. I don't know when this happens, but looking at the environment it looks like there's something wrong with these vars:

```
C:\>set
...
RUBYOPT=VAGRANT_RUBYOPT_SAVED
VAGRANT_RUBYOPT_SAVED=VAGRANT_RUBYOPT_SAVED
...
```

Should that be `RUBYOPT=%VAGRANT_RUBYOPT_SAVED%` ???

Unsetting the `RUBYOPT` and `VAGRANT_RUBYOPT_SAVED` temporarily fixes the symptoms until it occurs again.

I'm on Windows, Vagrant 1.2.2.

Anyone else experiencing this?
Reply all
Reply to author
Forward
0 new messages