Ruby on rails 终端。bash_的配置文件被弄乱了。如何恢复?
我正在学习如何设置RubyonRails的教程 我跑:Ruby on rails 终端。bash_的配置文件被弄乱了。如何恢复?,ruby-on-rails,ruby,emacs,terminal,.bash-profile,Ruby On Rails,Ruby,Emacs,Terminal,.bash Profile,我正在学习如何设置RubyonRails的教程 我跑: $ brew install rbenv $ touch ~/.bash_profile $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile 现在我的终端已经停止工作了 $ emacs ~/.bash_profile -bash:emacs:未找到命令 当我打开一个新的终端窗口时。我得到以下信息: Last login: Mon Sep 23 23:25:39 on tt
$ brew install rbenv
$ touch ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
现在我的终端已经停止工作了
$ emacs ~/.bash_profile
-bash:emacs:未找到命令
当我打开一个新的终端窗口时。我得到以下信息:
Last login: Mon Sep 23 23:25:39 on ttys001
-bash: n: command not found
export PATH=/usr/local/bin:/Users/Marcus/.local/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
-bash: export: `export PATH="/Users/Marcus/.rbenv/shims:${PATH}"
source "/usr/local/Cellar/rbenv/0.4.0/libexec/../completions/rbenv.bash"
rbenv rehash 2>/dev/null
rbenv() {
typeset command
command="$1"
if [ "$#" -gt 0 ]; then
shift
fi
case "$command" in
rehash|shell)
eval `rbenv "sh-$command" "$@"`;;
*)
command rbenv "$command" "$@";;
esac
}': not a valid identifier
谢谢你Yevgeny Anfilofyev 解决方案是使用TinkerTools并删除我的~/.bash_配置文件
然后重新开始删除您的
.bash\u配置文件
,并以root
身份重新登录,删除旧配置文件,或者重新启动到单用户模式并执行此操作。虽然在尝试设置开发环境时发生了这种情况,但这个问题几乎与堆栈溢出无关,在上可能会做得更好。