From Fedora Project Wiki

No edit summary
Line 10: Line 10:
sudo yum install ruby
sudo yum install ruby
</pre>
</pre>
Type in your password. Now you should see something like this:
Type in your password. When you should see something like this:
<pre>
<pre>
Loaded plugins: langpacks, presto, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package ruby.x86_64 0:1.9.3.327-22.fc18 will be installed
--> Processing Dependency: ruby-libs(x86-64) = 1.9.3.327-22.fc18 for package: ruby-1.9.3.327-22.fc18.x86_64
--> Processing Dependency: rubygem(bigdecimal) >= 1.1.0 for package: ruby-1.9.3.327-22.fc18.x86_64
--> Processing Dependency: ruby(rubygems) >= 1.8.23 for package: ruby-1.9.3.327-22.fc18.x86_64
--> Processing Dependency: libruby.so.1.9()(64bit) for package: ruby-1.9.3.327-22.fc18.x86_64
--> Running transaction check
---> Package ruby-libs.x86_64 0:1.9.3.327-22.fc18 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: ruby-libs-1.9.3.327-22.fc18.x86_64
---> Package rubygem-bigdecimal.x86_64 0:1.1.0-22.fc18 will be installed
---> Package rubygems.noarch 0:1.8.24-3.fc18 will be installed
--> Processing Dependency: rubygem(rdoc) >= 3.9.4 for package: rubygems-1.8.24-3.fc18.noarch
--> Processing Dependency: rubygem(io-console) >= 0.3 for package: rubygems-1.8.24-3.fc18.noarch
--> Running transaction check
---> Package libyaml.x86_64 0:0.1.4-3.fc18 will be installed
---> Package rubygem-io-console.x86_64 0:0.3-22.fc18 will be installed
---> Package rubygem-rdoc.noarch 0:3.12-5.fc18 will be installed
--> Processing Dependency: rubygem(json) < 2 for package: rubygem-rdoc-3.12-5.fc18.noarch
--> Processing Dependency: rubygem(json) >= 1.4 for package: rubygem-rdoc-3.12-5.fc18.noarch
--> Processing Dependency: ruby(irb) for package: rubygem-rdoc-3.12-5.fc18.noarch
--> Running transaction check
---> Package ruby-irb.noarch 0:1.9.3.327-22.fc18 will be installed
---> Package rubygem-json.x86_64 0:1.6.5-2.fc18 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package                Arch        Version                  Repository  Size
================================================================================
Installing:
ruby                    x86_64      1.9.3.327-22.fc18        fedora      61 k
Installing for dependencies:
libyaml                x86_64      0.1.4-3.fc18            fedora      54 k
ruby-irb                noarch      1.9.3.327-22.fc18        fedora      73 k
ruby-libs              x86_64      1.9.3.327-22.fc18        fedora      2.6 M
rubygem-bigdecimal      x86_64      1.1.0-22.fc18            fedora      71 k
rubygem-io-console      x86_64      0.3-22.fc18              fedora      43 k
rubygem-json            x86_64      1.6.5-2.fc18            fedora      470 k
rubygem-rdoc            noarch      3.12-5.fc18              fedora      218 k
rubygems                noarch      1.8.24-3.fc18            fedora      174 k
Transaction Summary
================================================================================
Install  1 Package (+8 Dependent packages)
Total download size: 3.8 M
Total download size: 3.8 M
Installed size: 12 M
Installed size: 12 M
Is this ok [y/N]:
Is this ok [y/N]:
</pre>
</pre>
Type <code>y</code>, then press enter.
Type <code>y</code>, then press enter. After Ruby is installed, type <code>irb</code> in the terminal.
You should start seeing something like this now:
<pre>
Downloading Packages:
--------------------------------------------------------------------------------
Total                                            82 kB/s | 3.8 MB    00:47   
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libyaml-0.1.4-3.fc18.x86_64                                  1/9
  Installing : ruby-libs-1.9.3.327-22.fc18.x86_64                          2/9
  Installing : ruby-irb-1.9.3.327-22.fc18.noarch                            3/9
  Installing : rubygem-json-1.6.5-2.fc18.x86_64                            4/9
  Installing : rubygem-io-console-0.3-22.fc18.x86_64                        5/9
  Installing : rubygem-bigdecimal-1.1.0-22.fc18.x86_64                      6/9
  Installing : rubygem-rdoc-3.12-5.fc18.noarch                              7/9
  Installing : rubygems-1.8.24-3.fc18.noarch                                8/9
  Installing : ruby-1.9.3.327-22.fc18.x86_64                                9/9
  Verifying  : libyaml-0.1.4-3.fc18.x86_64                                  1/9
  Verifying  : rubygem-json-1.6.5-2.fc18.x86_64                            2/9
  Verifying  : ruby-irb-1.9.3.327-22.fc18.noarch                            3/9
  Verifying  : rubygem-io-console-0.3-22.fc18.x86_64                        4/9
  Verifying  : rubygem-bigdecimal-1.1.0-22.fc18.x86_64                      5/9
  Verifying  : ruby-libs-1.9.3.327-22.fc18.x86_64                          6/9
  Verifying  : rubygem-rdoc-3.12-5.fc18.noarch                              7/9
  Verifying  : rubygems-1.8.24-3.fc18.noarch                                8/9
  Verifying  : ruby-1.9.3.327-22.fc18.x86_64                                9/9
 
Installed:
  ruby.x86_64 0:1.9.3.327-22.fc18                                             
 
Dependency Installed:
  libyaml.x86_64 0:0.1.4-3.fc18                                               
  ruby-irb.noarch 0:1.9.3.327-22.fc18                                         
  ruby-libs.x86_64 0:1.9.3.327-22.fc18                                         
  rubygem-bigdecimal.x86_64 0:1.1.0-22.fc18                                   
  rubygem-io-console.x86_64 0:0.3-22.fc18                                     
  rubygem-json.x86_64 0:1.6.5-2.fc18                                           
  rubygem-rdoc.noarch 0:3.12-5.fc18                                           
  rubygems.noarch 0:1.8.24-3.fc18                                             
 
Complete!
</pre>

Revision as of 22:46, 15 December 2012


This Cookbook will get you started with installing Ruby, and creating simple "Hello, World" projects with some popular frameworks such as Ruby on Rails, Shoes, Sinatra, and others.

This cookbook is based off of a factory-fresh Fedora 18 (Beta) release.

Getting Started

First off, we'll install Ruby. Open a terminal (by going to Applications -> System -> Terminal) and type the following:

sudo yum install ruby

Type in your password. When you should see something like this:

Total download size: 3.8 M
Installed size: 12 M
Is this ok [y/N]:

Type y, then press enter. After Ruby is installed, type irb in the terminal.