Jump to: navigation, search

Difference between revisions of "RubyGems"

Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
The following sections provide basic information about installing Ruby and [[RubyGems]] on Windows as well as Linux computers from a few vendors and 'How to Access and Update' Ruby and [[RubyGems]] on OS X 10.4+ from Apple and 3rd Parties.
+
The following sections provide basic information about installing Ruby and [[RubyGems]] on various platforms ( ''the recommended way to install it via each platform is listed below instead of every possible way to install it. Check for Alternative methods at the links provided or others acquired by any other means.'' ).
  
 
== Ubuntu ==
 
== Ubuntu ==
Line 24: Line 24:
 
<code>export PATH=$PATH:/var/lib/gems/1.8/bin</code>
 
<code>export PATH=$PATH:/var/lib/gems/1.8/bin</code>
  
===Windows===
+
=== Windows ===
 
Download and install <a href="http://www.rubyinstaller.org/" title="ruby installer for windows">Ruby Installer for Windows</a>. The installer already includes [[RubyGems]].
 
Download and install <a href="http://www.rubyinstaller.org/" title="ruby installer for windows">Ruby Installer for Windows</a>. The installer already includes [[RubyGems]].
  
Line 34: Line 34:
 
</code></pre>
 
</code></pre>
  
===[[RedHat]] Linux===
+
=== [[RedHat]] Linux ===
  
 
<p>From a terminal, use the <code>yum</code> command-line tool to install Ruby and [[RubyGems]], as shown below.</p>
 
<p>From a terminal, use the <code>yum</code> command-line tool to install Ruby and [[RubyGems]], as shown below.</p>
Line 53: Line 53:
  
 
</ol>
 
</ol>
===SuSE Linux===
+
=== SuSE Linux ===
  
 
<p>From a terminal, use the <code>yast</code> command-line tool to install Ruby and [[RubyGems]], as shown below.</p>
 
<p>From a terminal, use the <code>yast</code> command-line tool to install Ruby and [[RubyGems]], as shown below.</p>

Revision as of 09:45, 24 April 2012

The following sections provide basic information about installing Ruby and RubyGems on various platforms ( the recommended way to install it via each platform is listed below instead of every possible way to install it. Check for Alternative methods at the links provided or others acquired by any other means. ).

Ubuntu

Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it. Be sure to Follow any extra instructions from the Software Center should there be any during or after installation. Alternatively you can install from a terminal as well, use the apt-get command-line tool to install Ruby and RubyGems, as shown below.

  • Install the full Ruby package and RubyGems: prompt$ sudo apt-get install ruby-full rubygems
- Consult your system administrator for any required authentication credentials for the sudo command that may required.

Debian Linux

  • Ubuntu is built onto of a Debian foundation, so the same steps and options as Ubuntu above for the Alternative install method, or GUI Using Synaptic package manager instead of Software Center.

Mac OS X

Mac's with version 10.5 Leopard or higher already have Ruby and RubyGems installed, Ruby and RubyGems update instructions are here at the Homebrew for OS X page, as well as instructions for adding Homebrew to your OS X machine if you do not already have it installed.

If you are using an earlier version of Mac OS like 10.3 or 10.4, try following any directions at <a href="http://rubygems.org/pages/download">RubyGems</a> to see if your version is still supported officially or not, plus there many community workarounds and tips for those wishing to still make use of OS X or Pure Darwin sometimes registers here too on older machines or newer machines both.

Test to ensure that the gem command is in your path: $ which gem

If the command is not found, then update your PATH variable accordingly. For example, you can update your .bashrc file with the following line: export PATH=$PATH:/var/lib/gems/1.8/bin

Windows

Download and install <a href="http://www.rubyinstaller.org/" title="ruby installer for windows">Ruby Installer for Windows</a>. The installer already includes RubyGems.

Be sure you use the Ruby-enabled command prompt window when you later install and use vmc. You access this command prompt from the Windows Start menu (All Programs > Ruby <version> > Start Command Prompt with Ruby).

Finally, update RubyGems from the Ruby Command Prompt:

<code>prompt> gem update --system
</code>

RedHat Linux

From a terminal, use the yum command-line tool to install Ruby and RubyGems, as shown below.

    Install Ruby:

    prompt$ sudo yum install ruby

    If you are using RedHat Enterprise Linux 6, enable the Optional channel for your host by logging into <a href="https://rhn.redhat.com/">Red Hat Network (RHN)</a>.

    Install RubyGems:

    prompt$ sudo yum install rubygems

SuSE Linux

From a terminal, use the yast command-line tool to install Ruby and RubyGems, as shown below.

    Install Ruby:

    prompt$ yast -i ruby

    Install RubyGems:

    prompt$ yast -i rubygems