Since Ruby is installed on shared servers, including our Ruby Hosting plans, you have the ability to install gems. Gems are software packages that utilize the Ruby framework. Once they are installed, the new functionality can be used for your website. In my example, I will be installing Sass, which is an “extension of css.”
How to Install Ruby Gems
- Login to your server via SSH.
- Run the following ruby install command. Be sure to replace sass with the actual gem you want to install.
gem install sass
You should see a response similar to this, based on the gem you install.
Successfully installed sass-3.4.2…
1 gem installed
Installing ri documentation for sass-3.4.2…
Installing RDoc documentation for sass-3.4.2…In this example, you see the the message “1 gem installed,” along with the documentation.
Congratulations, now you know how to Install a Ruby via SSH using command line! To continue learning, see the Official Ruby Guides. Code Academy is also a good source for learning to Ruby. Plus, check out our Ruby Education Channel for more info!