all repos — h3rald @ a0608970a4faab23e4926c31188e7c579d2f15b3

The sources of https://h3rald.com

contents/ruby-compendium/book/gems.html

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
-----
title: "Ruby Compendium – Ruby Gems"
content-type: page
-----
<nav class="navigation"><a href="/ruby-compendium/book/features.html">← Advanced Language Features</a> | <a href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/gem-tips.html">What you can use for... →</a></nav>
<p>Sure, the <a href="/ruby-compendium/book/core-stdlib.html#core-stdlib">Standard Library</a> is quite large but&#8230; no, it does not have everything you need. Luckily, it&#8217;s full of gems out there! Rubygems is Ruby&#8217;s packaging system, and the best way to distribute your own libraries and applications.</p>
<p>The Rubygems packaging system is now included in most Ruby implementation and distributions. Installing a gem and all its dependencies is as easy as issuing <code>gem install &lt;name of the gem&gt;</code>. So for example if you want to install the <a href="https://rubygems.org/gems/rails">rails</a> gem, you can just run</p>
<p><code>gem install rails</code></p>
<p>&#8230;and it will be automatically downloaded and installed on your system, along with the other gems it depends on.</p>
<section class="section">
<header><h1 id="h_16" class="toc">RubyGems.org</h1></header>
There are over 1300 different gems publicly (and freely!) available. Luckily, the official gem host site, <a href="http://www.rubygems.org">RubyGems.org</a> makes it very easy to find what you're looking for: just search for a particular gem or a functionality you're looking for, and browse through the results. You can also register and <em>push</em> your own gems for other people to use.

</section>
<aside class="box">
<div class="box-title">What happened to RubyForge?</div>
<p>If you started to learn Ruby a few years ago, the <a href="http://www.rubyforge.org">RubyForge</a> was <em>the</em> place to find user-created ruby code and gems. The site is still there, but nowadays Rubyists prefer using <a href="http://www.github.com">GitHub</a> as host for their source code repositories and RubyGems.org as the home for their gems.</p>

</aside>
<nav class="navigation"><a href="/ruby-compendium/book/features.html">← Advanced Language Features</a> | <a href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/gem-tips.html">What you can use for... →</a></nav>