So I’m trying to install a package
$ sudo gem install compass
to be specific. It installs correctly and shows up when I do a list:
$ gem list
*** LOCAL GEMS ***
chunky_png (1.2.5)
compass (0.12.2)
fssm (0.2.9)
sass (3.1.20)
but for some reason when I try to run compass nothing happens. It says the command is not found. What am I doing wrong?
$ compass
bash: compass: command not found
I’m running Ubuntu if that helps.
Confirm that there is output for
locate -r /compass.rb$, thenecho $GEM_HOME. You should find thatgemdoesn’t know about the directory thatcompassinstalled to. You can either move it from its previous location into the directory specified byGEM_HOME, or else append that directory to the variable in your~/.bash_rcfile. Much better, though, would be to uservmfor managing your gems (and Rubies), as it neatly avoids this sort of issue and also allows much finer control over the whole process.