Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby and gems are installed but sass gem not working

Tags:

sass

ruby

gem

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.

like image 462
RatavaWen Avatar asked Feb 12 '13 03:02

RatavaWen


People also ask

Is Gem installed with Ruby?

Ruby installs the dependency rbtree and builds its extension, installs the drip gem, then builds documentation for the installed gems. You can disable documentation generation using the --no-document argument when installing gems.

What is GEM sass?

Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.

Where are gem packages installed?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9. 1 . The commands provided by the gems you installed will end up in ~/.


1 Answers

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.

like image 197
j_mcnally Avatar answered Nov 13 '22 09:11

j_mcnally