Leetechie
Leetechie

Reputation: 69

trying to create a compass file

I installed compass with:

    sudo gem install compass

and version 0.12.2 gem installed, but when I did

    compass version 

or

    compass create myfilename

I get "command not found". I tried uninstalling and reinstalling and I'm still stuck on the same thing.

All of this from /Users/mycomputer. Appreciate any help.

Upvotes: 2

Views: 2075

Answers (1)

maxbeatty
maxbeatty

Reputation: 9325

Your gem executable directory does not appear to be in your $PATH. This may not be the best way to remedy this, but it's pretty direct. Hopefully other members will help improve the answer.

To remedy this, find your gem executable directory:

$ gem environment

and look for the EXECUTABLE DIRECTORY line like this:

- EXECUTABLE DIRECTORY: /Users/mycomputer/.rvm/gems/ruby-1.9.3-p194@foo/bin

Double check that it isn't already in your $PATH by looking for it when you run:

$ echo $PATH

If you don't see your EXECUTABLE DIRECTORY, edit (or create) .profile in your home directory adding (or modifying):

export PATH="/Users/mycomputer/.rvm/gems/ruby-1.9.3-p194@foo/bin:$PATH"

Now reload your .profile to update your $PATH and check that your EXECUTABLE DIRECTORY is present and try running compass again.

$ . ~/.profile
$ echo $PATH
/Users/mycomputer/.rvm/gems/ruby-1.9.3-p194@foo/bin:/usr/bin:/bin:/usr/sbin:/sbin...
$ compas --version
Compass 0.12.2 (Alnilam)

Hope this gets you on your way. Managing gems and paths can be a pain. Do what works for you. You might look into RVM so you don't have to sudo install gems, but I digress.

Upvotes: 6

Related Questions