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 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
----- 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… no, it does not have everything you need. Luckily, it’s full of gems out there! Rubygems is Ruby’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 <name of the gem></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>…and it will be automatically downloaded and installed on your system, along with the other gems it depends on. </p> <section class="section"> <header> <h3 id="h_16" class="toc">RubyGems.org</h3> </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> |