Forget about brew installation if you have ruby already installed. You then need to configure symlinks to path and this is a pain in the ass. Use RVM
Install the stable release version:
curl -L https://get.rvm.io | bash -s stable
Finish the installation by either running the following command, or closing all shell windows.
Before installing the latest version of ruby with rvm, we need to install libksba.
brew install libksba
Then install Ruby 1.9.3 with
rvm install 1.9.3
Now install Sass and Compass.
gem install sass
gem install compass