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