While rbenv works fine, I recently encountered strange error after upgrade (was working before).
$ rbenv install 2.3.4
: invalid optionbenv/plugins/ruby-build/bin/rbenv-install: line 26: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
/home/aurimus/.rbenv/plugins/ruby-build/bin/rbenv-install: line 28: $'\r': command not found
: invalid shell option names/ruby-build/bin/rbenv-install: line 31: shopt: nullglob
/home/aurimus/.rbenv/plugins/ruby-build/bin/rbenv-install: line 32: syntax error near unexpected token `$'do\r''
'home/aurimus/.rbenv/plugins/ruby-build/bin/rbenv-install: line 32: `for plugin_path in "$RBENV_ROOT"/plugins/*/share/ruby-build; do
Anyone has any idea what this is? Pretty sure it's some kind of WSL related issue, maybe related to line endings being different in windows, but can't say why it stopped working after making git pull on ruby-build
Thanks
@looks like your rbev-install file has mixed Unix and Windows line endings. Use the dos2unix package to convert all the line endings to Unix.
Thanks @benhillis!
Most helpful comment
@looks like your rbev-install file has mixed Unix and Windows line endings. Use the dos2unix package to convert all the line endings to Unix.