All terminal commands (like ls, cd, edit, open) are returning errors on my Mac
- by park
From what I can tell from reading other questions/answers is that my .bash_profile file may be corrupt. If I type
echo $PATH
in terminal the result is:
/usr/local/git/bin
From what I've read, that's not what the result is supposed to be. But I also can't get any of the commands (like edit or subl, for Sublime Text 2) to open the .bash_profile file to edit it. I was able to open the file in TextEdit using "cmd-shift-.", and here's what's in the file:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
PATH=$PATH:~/bin
export PATH
export PATH=/usr/local/git/bin
But the file is LOCKED, so I can't edit it there either. I'm very new to programming and in the middle of trying to install everything on my Mac to go through a Ruby on Rails tutorial. I can't even check my version of ruby, since even
ruby -v
returns
-bash: ruby: command not found
Any help would be greatly appreciated. Thanks.