RatavaWen
RatavaWen

Reputation: 147

ruby and gems are installed but sass gem not working

I know I have ruby and gem installed because I've installed a bunch of gems previously. Additionally when I do the following

~$ ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302 [i486-linux]

~$ gem --version
1.3.7

They, as you can see, return the version--yet when I try to do this--

~$ sass --watch happy.scss:happy.css
bash: sass: command not found

I'm a relative noob to everything, but far more to ruby and gems. For the sake of revealing more or less my level of understanding things generally I've learned enough of Debian to get a an environment where I could get Clojure running and get a web app working (taken me almost a year of spare time to do that--I knew virtually nothing of programming previoiusly). I'm trying to get sass working to ease my mental load in the webpage design side of things and I'm just hitting a brick wall on this.

Would this be a PATH issue? If so what needs to be on the path so that one gem works --

BTW here's what happens when I install sass--

# gem install sass
Successfully installed sass-3.2.5
1 gem installed
Installing ri documentation for sass-3.2.5...
Installing RDoc documentation for sass-3.2.5...

Any help anyone can give will be much appreciated. I've been at this one all day and can't figure it out for the life of me.

Upvotes: 7

Views: 9105

Answers (1)

j_mcnally
j_mcnally

Reputation: 6958

justin ⮀ ~ ⮀ gem install sass  
Fetching: sass-3.2.5.gem (100%)
Successfully installed sass-3.2.5
1 gem installed

justin ⮀ ~ ⮀ sass -v
Sass 3.2.5 (Media Mark)

seems ok to me. I would check your path.

The proper PATH would depend on where your gems get installed. I use RVM so it will be different. You could try to throw an exception in your ruby code with rubygems loaded this should give you a starting point.

> rails c
Loading development environment (Rails 3.2.11)
1.9.3p362 :001 > throw test



ArgumentError: wrong number of arguments (0 for 2..3)
        from (irb):1:in `test'
        from (irb):1
        from /Users/justin/.rvm/gems/[email protected]/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start'
        from /Users/justin/.rvm/gems/[email protected]/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start'
        from /Users/justin/.rvm/gems/[email protected]/gems/railties-3.2.11/lib/rails/commands.rb:41:in `<top (required)>'
        from script/rails:5:in `require'
        from script/rails:5:in `<main>'

so from that i see /Users/justin/.rvm/gems/[email protected]/gems/railties-3.2.11/lib/rails/commands/console.rb

so my bin path is at /Users/justin/.rvm/gems/[email protected]/bin

and if i

> ls /Users/justin/.rvm/gems/[email protected]/bin

b2json              capify              fog                 html2haml           nokogiri            rails               ri                  sass-convert        therubyracer        tilt
bundle              coderay             geocode             httpclient          oauth               rake2thor           ruby_noexec_wrapper scss                thin                tt
cap                 erubis              haml                j2bson              rackup              rdoc                sass                sprockets           thor

boom sass

so in my case I would want to add /Users/justin/.rvm/gems/[email protected]/bin

but i use RVM so it does that for me.

Upvotes: 9

Related Questions