compassをインストールしたのにcommand not foundになる
MacでSass&compassを使おうとした時にcompassをインストールしたはいいものの、command not foundになる現象。
$ gem install compass $ compass create $ compass: command not found
調べてみると原因はrbenvにある模様。
$ which railsすると~/.rbenv/shims/railsを向いていると思う。
これはrbenvがrailsコマンドをラップしたもので、実体がどこにあるかは$ rbenv which railsで調べることがでる。
で、それは~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.2.3/bin/railsあたりを向いている。
Ruby – `rbenv: rails: command not found`の対処方法 – Qiita [キータ]
ということらしいです。
なので、言われたとおりにrailtiesをインストールしてrehashしました。
$ gem install railties && rbenv rehash
うむ、バッチリだ!awesome!!