Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/Users/UserName/.rvm/scripts/rvm:97: parse error near `unset' #4898

Closed
anatoliykant opened this issue Mar 30, 2020 · 10 comments
Closed

/Users/UserName/.rvm/scripts/rvm:97: parse error near `unset' #4898

anatoliykant opened this issue Mar 30, 2020 · 10 comments
Milestone

Comments

@anatoliykant
Copy link

RVM error - parse error near `unset'

$ source /Users/kant/.rvm/scripts/rvm
/Users/kant/.rvm/scripts/rvm:97: parse error near `unset'

Description

When executing a command

source /Users/userName/.rvm/scripts/rvm

I get an error:

/Users/userName/.rvm/scripts/rvm:97: parse error near `unset'

Steps to reproduce

  1. On Mac OS in iTerm with Zsh install RVM:
\curl -sSL https://get.rvm.io | bash -s stable --ruby
  1. After that, execute the suggested command:
source /Users/userName/.rvm/scripts/rvm
  1. I get an error:
/Users/userName/.rvm/scripts/rvm:97: parse error near `unset'

Expected behavior

In step 2, the successful execution of the command without error

Actual behavior

Environment info

$ rvm info

ruby-2.7.0:

  system:
    uname:        "Darwin MacBook-Pro-Podkladov.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64"
    name:         "OSX"
    version:      "10.15"
    architecture: "x86_64"
    bash:         "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)"
    zsh:          "/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin19.0)"
    remote_path:  "osx/10.15/x86_64"
    xcode:        "11.4"

  rvm:
    version:      "1.29.10-next (master)"
    updated:      "18 minutes 46 seconds ago"
    path:         "/Users/kant/.rvm"
    autolibs:     "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "2.7.0p0"
    date:         "2019-12-25"
    platform:     "x86_64-darwin19"
    patchlevel:   "2019-12-25 revision 647ee6f091"
    full_version: "ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]"

  homes:
    gem:          "/Users/kant/.rvm/gems/ruby-2.7.0"
    ruby:         "/Users/kant/.rvm/rubies/ruby-2.7.0"

  binaries:
    ruby:         "/Users/kant/.rvm/rubies/ruby-2.7.0/bin/ruby"
    irb:          "/Users/kant/.rvm/rubies/ruby-2.7.0/bin/irb"
    gem:          "/Users/kant/.rvm/rubies/ruby-2.7.0/bin/gem"
    rake:         "/Users/kant/.rvm/rubies/ruby-2.7.0/bin/rake"

  environment:
    PATH:         "/Users/kant/.rvm/gems/ruby-2.7.0/bin:/Users/kant/.rvm/gems/ruby-2.7.0@global/bin:/Users/kant/.rvm/rubies/ruby-2.7.0/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/kant/.rvm/bin"
    GEM_HOME:     "/Users/kant/.rvm/gems/ruby-2.7.0"
    GEM_PATH:     "/Users/kant/.rvm/gems/ruby-2.7.0:/Users/kant/.rvm/gems/ruby-2.7.0@global"
    MY_RUBY_HOME: "/Users/kant/.rvm/rubies/ruby-2.7.0"
    IRBRC:        "/Users/kant/.rvm/rubies/ruby-2.7.0/.irbrc"
    RUBYOPT:      ""
    gemset:       ""
@anatoliykant
Copy link
Author

Hey

Is there anything about my problem?

@pkuczynski
Copy link
Member

I dont know why this line would cause a problem. Nobody else reported this either. I am using ZSH on macOS Catalina too, and dont experience this issue. Its super hard to debug it if its not reproducible :(

@anatoliykant
Copy link
Author

I dont know why this line would cause a problem. Nobody else reported this either. I am using ZSH on macOS Catalina too, and dont experience this issue. Its super hard to debug it if its not reproducible :(

Hey, Piotr.
Yes, I also successfully installed rvm on 4 mac mini (ci agents) and my hackintosh. But on macbook I get the error described above. I installed rbenv on it and everything works like a clock. Anyway, thanks for the answer. 😉

@azlonians
Copy link

I am getting this issue as well.

@ghost
Copy link

ghost commented Aug 14, 2020

Had same error when made a typo in zshrc trying to config alias, fixed the type restated zsh and the problem gone

@anatoliykant
Copy link
Author

anatoliykant commented Aug 14, 2020

fixed the type restated zsh and the problem gone

Hi, @powermic
Сan you tell us more about the solution to the problem?
What steps should be taken?

@ghost
Copy link

ghost commented Aug 14, 2020

fixed the type restated zsh and the problem gone
Hi, @powermic
Сan you tell us more about the solution to the problem?
What steps should be taken?

typo

@anatoliykant
Copy link
Author

typo

Can you show the contents of zshrc which are about rvm settings?

@ghost
Copy link

ghost commented Aug 14, 2020

alias do="my command"
one can't use do as alias as it is reserved

@pkuczynski pkuczynski added this to the rvm-1.29.11 milestone Dec 29, 2020
@okeeffed
Copy link

alias do="my command"
one can't use do as alias as it is reserved

omfg I can't believed I go burned by a reserved alias 😂

Bless your sweet soul, deleted user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants