Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't use my command line (terminal).

sudo gem install compass

but I only get "command not found". I'm admin om my Mac and my password is not blank.

I've also tried this:

defaults write AppleShowAllFiles YES

same result.

share|improve this question

migrated from Apr 19 '12 at 2:41

This question came from our site for professional and enthusiast programmers.

I'm not sure from what you've said whether only certain commands fail or whether it's the command line generally. Do simple things like 'ls' work? (If nothing works in Terminal, I'd try creating a fresh account to see if something in your user library was messed up._ – Phillip Mills Apr 13 '12 at 11:43
I made a new account and I can use the Terminal there so you are problably right. Any suggestions on how to fix the user library? Thank you so much! – Oskar Apr 13 '12 at 12:32
I really don't know what things would affect Terminal that way; I only know that creating a new account is my standard way of figuring out whether something is the system's fault or mine. :-) (For that matter, it could be something messed up in one of the account's login profile or control files instead -- maybe even more likely.) – Phillip Mills Apr 13 '12 at 13:14
The usual thing that causes problems like this is a messed up PATH setting. Try the command echo $PATH and report the results. If your PATH is messed up, it's probably something in your .profile, .bash_login, .bash_profile, or .bashrc files (note that these are all directly in your home folder, not your Library folder). Have you made any changes to them recently? – Gordon Davisson Apr 13 '12 at 14:45

You've probably overwritten your PATH. Check this file* for statements with export PATH:


If Sencha has made any changes to that file, note that this is the correct syntax to be used to add a folder to your PATH:

export PATH=/some/other/path:$PATH

If you forgot the :$PATH, you'll overwrite it every time you start the Terminal. Therefore, OS X won't be able to find your commands. So, the fix would be to remove offending export lines completely, or fix them to use the right syntax.

export PATH=/Users/Oskar/Sencha:$PATH

* The file is hidden by default. If you are unable to see it from Finder, and your PATH is still broken, run the following command: /usr/bin/open ~/.bash_profile to open it in a text editor.

share|improve this answer
Yeah something is problably wrong with my PATH, I got tis result when I tried echo $PATH: /Users/Oskar/Sencha. Maybe there was som changes made when I installed Sencha? Thank you for the answer – user130369 Apr 26 '12 at 9:00

You must log in to answer this question.