Ubuntu “compass: command not found”
The problem is that gem command executables aren't added to PATH. This is easily solved with this command.
echo "PATH=\$PATH:/var/lib/gems/1.8/bin:\$HOME/.gem/ruby/1.8/bin" >> /etc/profile.d/rubygems1.8.sh
Then re-login and it should be working.
It's necessary to escape the $ as done above. The /etc/profile.d/ directory contains app specific bootstrapping/environment variables, and is very suitable for this.