Friday, March 6, 2015

Ruby Gems - Compass and Sass

Ruby Gems
  • RubyGems is a package manager for the Ruby programming language.
  • Facilitates the easy installation of gems [Ruby Programs] and also in managing the Server that distributes gems

Why we go for Ruby Gems?
  • Ruby Gems helps in downloading and managing the gems. In specific it helps in installing the Sass tool and compass too to compile the .scss files to .css

Installation of Ruby Gems
  • RubyGems comes as a part of standard library with the Ruby Version 1.9.
  • Download Ruby Gems from http://rubyinstaller.org/downloads/ and install it.

Installation of Gems:
Let's install sample Gem [Sass / Compass - Ruby Gems]
Step 1
    Check if Ruby and Ruby Gems have correctly installed using the commands
ruby --version
gem --version
Step 2
    Setup up the Environment in the Platforms Windows and Mac.
    Windows
    Run the below commands that removes the SSL security which in turn would help us handshake with Ruby Server      
        gem sources -r https://rubygems.org/ - to temporarily remove secure connection
gem sources -a http://rubygems.org/ - add insecure connection
gem update --system - now we're able to update rubygems without SSL
    Mac
    sudo gem update --system  
        xcode-select --install //Installs the xcode command line tool that lays the platform for installing compass later
Step 3
   Install the gems as below
    Windows:    
    gem install sass
  gem install compass
    Mac:
    sudo gem install sass
    sudo gem install compass

1 comment:

  1. Hi,
    I'm trying to run gulp task using maven plugin https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/

    I got the following error.

    Error: You need to have Ruby and Compass installed and in your system PATH for this task to work.]
    [INFO] message: 'You need to have Ruby and Compass installed and in your system PATH for this task to work.',

    How do I install Ruby and Compass using maven and add to system PATH.

    I've no clue whats Ruby and how it works.

    Any advice would be helpful.

    Thanks
    Thiru

    ReplyDelete