Error installing rbenv

Asked 2 years ago, Updated 2 years ago, 42 views

When installing rbenv,

$echo'eval"$(rbenv init-)"'>>~/.bash_profile
$ source to /.bash_profile

After the , the following error occurs:

-bash:eval:line1:syntax error near unexpected token`('
-bash:eval:line1:`"exportPATH="/Users/xxxx/.rbenv/shims:${PATH}">export RBENV_SHELL=bash source 
'/usr/local/Cellar/rbenv/1.1.1/libexec/../completions/rbenv.bash' command > rbenv rehash2>/dev/null rbenv() {local command command="$1" if ["$#"->gt;gt0];then shift phase(rehash$")| 
"sh-$command" "$@")";;*) command rbenv "$command" "$@";esac}"'

Please teach me! By the way,

$rbenvinit-

The results of running the are

export PATH="/Users/xxxx/.rbenv/shims:${PATH}"
export RBENV_SHELL=bash
source'/usr/local/Cellar/rbenv/1.1.1/libexec/../complets/rbenv.bash'
command rbenv rehash2>/dev/null
rbenv(){
  local command
  command = "$1"
  if ["$#"-gt0];then
    shift
  fi

  case "$command" in
  rehash | shell )
    event"$(rbenv"sh-$command""$@")";
  *)
    command rbenv "$command" "$@";
  esac
}

is now

ruby-on-rails ruby

2022-09-30 14:25

1 Answers

$(rbenvinit-) is surrounded by " (U+201C) and " (U+201D) instead of double quotes".Be careful (you can optionally disable it) especially with macOS, because the "smart quotation marks" feature can cause this conversion to occur when typing.

--From comment by metropolis


2022-09-30 14:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.