Gem does not install package
So I am trying to install the package
$ sudo gem install compass
... It installs correctly and displays when I make the 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 start the compass, nothing happens. He says the command has not been found. What am I doing wrong?
$ compass
bash: compass: command not found
I am running Ubuntu if that helps.
source to share
Confirm that there is an exit for locate -r /compass.rb$
, then echo $GEM_HOME
. You should find that gem
you are unaware of the directory for which it is installed compass
. You can move it from your previous location to the directory you specified GEM_HOME
, or add that directory to a variable in your file ~/.bash_rc
. However, it would be much better to use it rvm
to manage your gems (and rubies) as it neatly avoids this kind of problem and also allows for much more precise control over the entire process.
source to share
This problem can be solved as follows:
http://markushedlund.com/dev-tech/ubuntu-compass-command-not-found
The problem is with the global PATH variable not updating correctly when installing the gem compass
Run
echo "PATH = \ $ PATH: /var/lib/gems/1.8/bin: \ $ HOME / .gem / ruby /1.8/bin" → /etc/profile.d/rubygems1.8.sh
and re-login
source to share