<p>I'm not sure of all of them, but what are the commands to do things like update Ruby, download a new gem, or update an existing gem? What other important things are there?</p>

<p>Since it might matter, I'm running Windows.</p>

[{'answer_id': 36447, 'author': 'Joseph Pecoraro', 'author_id': 792, 'author_profile': 'https://Stackoverflow.com/users/792', 'pm_score': 4, 'selected': False, 'text': '<p>By Ruby commands you probably mean the command line programs for Ruby.  These are also called Ruby Helper programs.  Here are a few:</p>\n\n<ul>\n<li><p><a href="http://linux.die.net/man/1/ruby" rel="nofollow noreferrer">ruby</a> - The interpreter itself.  Run Ruby scripts or statements.</p></li>\n<li><p><a href="http://www.rubygems.org/read/book/2" rel="nofollow noreferrer">gem</a> - Ruby Package Manager.  Great for automatically downloading or updating small Ruby modules like XML libraries, web servers, or even whole Ruby programs.</p></li>\n<li><p><a href="http://www.rubycentral.com/pickaxe/irb.html" rel="nofollow noreferrer">irb</a> - Interactive Ruby Prompt.  This is an entire Ruby shell that will let you execute any Ruby code you want.  You can load libraries, test code directly, anything you can do with Ruby you can do in this shell.  Believe me, there is quite a lot that you can do with it to improve your Ruby development workflow <a href="https://stackoverflow.com/questions/32537/what-is-the-best-way-to-use-a-console-when-developing#32686">[1]</a>.</p></li>\n<li><p><a href="http://www.caliban.org/ruby/rubyguide.shtml#ri" rel="nofollow noreferrer">ri</a> - Quick shell access to Ruby documentation.  You can find the RDoc information on nearly any Ruby Class or method.  The same kind of documentation that you would find on the online ruby-docs.</p></li>\n<li><p><a href="http://stdlib.rubyonrails.org/libdoc/erb/rdoc/index.html" rel="nofollow noreferrer">erb</a> - Evaluates embedded Ruby in Ruby Templated documents.  Embedded Ruby is just like embedding php into a document, and this is an interpreter for that kind of document.  This is really more for the rails crowd.  An alternative would be <a href="http://haml.hamptoncatlin.com/" rel="nofollow noreferrer">haml</a>.</p></li>\n<li><p><a href="http://ruby-doc.org/stdlib/libdoc/rdoc/rdoc/index.html" rel="nofollow noreferrer">rdoc</a> - Generate the standard Ruby documentation for one of your Ruby classes.  Its like Javadocs.  It parses the Ruby source files and generates the standard documentation from special comments.</p></li>\n<li><p><strong>testrb</strong> and <strong>rake</strong>.  I\'m not familiar enough with these.  I\'d love it if someone could fill these in!</p></li>\n</ul>\n\n<p>Hopefully this was what you were looking for!</p>\n'}, {'answer_id': 36452, 'author': 'John Topley', 'author_id': 1450, 'author_profile': 'https://Stackoverflow.com/users/1450', 'pm_score': 1, 'selected': False, 'text': '<pre><code>sudo gem install gemname\nsudo gem update gemname\n</code></pre>\n'}, {'answer_id': 36458, 'author': 'John Topley', 'author_id': 1450, 'author_profile': 'https://Stackoverflow.com/users/1450', 'pm_score': -1, 'selected': False, 'text': '<blockquote>\n  <p>@John Topley: Thanks. Is there a\n  similar command to update Ruby itself?</p>\n</blockquote>\n\n<p>Not really. You don\'t say which operating system you\'re using. I use Mac OS X and tend to <a href="http://hivelogic.com/articles/2008/02/ruby-rails-leopard" rel="nofollow noreferrer">build Ruby from source</a>.</p>\n'}, {'answer_id': 36463, 'author': 'Joseph Pecoraro', 'author_id': 792, 'author_profile': 'https://Stackoverflow.com/users/792', 'pm_score': 1, 'selected': False, 'text': '<p>Okay.  I see what you\'re going for but again try to go abstract because I know someone will give you a direct answer (which people should up-vote over this).</p>\n\n<p>Everyone should get comfortable with man pages.  But even if you are, you\'ll find that these commands lack decent man pages.  However, those that do will point you to <code>cmd --help</code> and you will find some decent documentation there.  I linked each of the commands above to a hopefully useful resource that will lead you to an answer if you\'re worried about command line switches.  I see someone already posted the commands so I won\'t repeat those for <code>gem</code>.  But I\'d go further and say:</p>\n\n<pre><code>sudo gem update [gemname]\n</code></pre>\n\n<p>The default behavior will update all installed gems.</p>\n\n<hr>\n\n<p>Also, as a bonus there is a neat gem called <a href="http://cheat.errtheblog.com/" rel="nofollow noreferrer">cheat</a>.  The idea is that instead of typing <code>man cmd</code> you will type <code>cheat cmd</code> and you can get a community editable man page for that command.  Or better yet, it doesn\'t have to be a command, it can be an entire <em>topic</em>.  Coincidentally to install cheat you would do:</p>\n\n<pre><code>sudo gem install cheat\n</code></pre>\n\n<p>And then:</p>\n\n<pre><code>cheat gem\n</code></pre>\n\n<p>That will <a href="http://cheat.errtheblog.com/s/gem/" rel="nofollow noreferrer">list out a "man page"</a> written by users like you about the gem command.  The commands that you asked for are on that page.  Anyone can add new pages, update existing pages, and contribute to the community.  If you\'re interested <a href="http://errtheblog.com/posts/32-cheat-again" rel="nofollow noreferrer">here</a> is a quick addition you can make to have autocompletion for the cheat command from the command line.</p>\n\n<p><em>I know I have long winded answers ;)</em></p>\n'}, {'answer_id': 36469, 'author': 'Joseph Pecoraro', 'author_id': 792, 'author_profile': 'https://Stackoverflow.com/users/792', 'pm_score': 1, 'selected': False, 'text': '<blockquote>\n  <p>Is there a similar command to update Ruby itself?</p>\n</blockquote>\n\n<p>Alas, <a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/262569" rel="nofollow noreferrer">no there is not</a>.  I\'m afraid that if you want to update Ruby itself you will have to either download an installer from the Ruby website, or compile it from source.</p>\n\n<p>I should mention though that compiling from source is very easy and offers developers quite a bit of neat flexibility.  You can <a href="http://www.nabble.com/Re:--SVN--Re:-Changes-for-Ruby-1.9-td19223651.html" rel="nofollow noreferrer">add a suffix</a> to the generated commands so that you can have standalone Ruby 1.8 and Ruby 1.9 builds both at the same time.  That can be very helpful for testing.</p>\n\n<p>Finally, its always a danger to update an operating systems built in commands unless it occurs through an official update.  Installed applications may be expecting to a Ruby 1.8 in the standard location and crash if they meet an updated version.  Any updates you make should just not overwrite one that came with an OS.  (If any app crashes then its the fault of the app\'s developers for not specifying the absolute path to the OS version).</p>\n'}, {'answer_id': 39103, 'author': 'Wes Oldenbeuving', 'author_id': 4187, 'author_profile': 'https://Stackoverflow.com/users/4187', 'pm_score': 5, 'selected': True, 'text': "<h1>Useful command: Rake</h1>\n\n<p>In addition to the commands listed by Joseph Pecoraro, the 'rake' command is also pretty standard when working with Ruby. Rake makes it easy to automate (simple) tasks; like building a RubyGem or running your unit tests.</p>\n\n<p>With rake, the only important command to remember is 'rake -T', which shows a list of rake tasks available in the current directory.</p>\n\n<h1>Updating a Ruby gem</h1>\n\n<p>To get back to your specific question:</p>\n\n<p>To update a specific gem, you can do two things: simply update the gem:</p>\n\n<pre><code>gem update &lt;gemname&gt;\n</code></pre>\n\n<p>This will update the gem to the latest version. </p>\n\n<h1>Install a Ruby gem</h1>\n\n<p>If you want to update to a specific version, you must install it:</p>\n\n<pre><code>gem install &lt;gemname&gt; -v &lt;gemversion&gt;\n</code></pre>\n\n<p>You can leave out the -v options. Rubygems then installs the latest version.</p>\n\n<h1>How to help yourself</h1>\n\n<p>Two useful gem commands to remember are:</p>\n\n<pre><code>gem help\n</code></pre>\n\n<p>This shows how to get help with rubygems.</p>\n\n<pre><code>gem help commands\n</code></pre>\n\n<p>This shows all commands available to rubygems.\nFrom here you can get more specific help on a command by using gem help:</p>\n\n<pre><code>gem help update\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/36430', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/572/']