Error installing rbenv

Asked 4 months ago, Updated 4 months ago, 7 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" "[email protected]")";;*) command rbenv "$command" "[email protected]";esac}"'

Please teach me! By the way,


The results of running the are

export PATH="/Users/xxxx/.rbenv/shims:${PATH}"
export RBENV_SHELL=bash
command rbenv rehash2>/dev/null
  local command
  command = "$1"
  if ["$#"-gt0];then

  case "$command" in
  rehash | shell )
    event"$(rbenv"sh-$command""[email protected]")";
    command rbenv "$command" "[email protected]";

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

© 2023 OneMinuteCode. All rights reserved.