Question

I was following a tutorial on how to setup ruby on rails. http://blog.parsalabs.com/blog/2013/08/27/setting-up-a-ruby-on-rails-4-development-environment-on-a-clean-mac-os-x-installation/

I ran:

$ brew install rbenv

$ touch ~/.bash_profile

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

and now my terminal has stopped working.

$ emacs ~/.bash_profile

-bash: emacs: command not found

when I open a new terminal window. I get the following message:

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
Was it helpful?

Solution

Thank you Yevgeniy Anfilofyev,

The solution was to use TinkerTools and delete my ~/.bash_profile

Then start over again

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top