How to Install Ruby

From ReduxWiki

Jump to: navigation, search

[edit] Install Ruby

[~]# yum install ruby
[~]# ruby -v


[edit] RubyGems

[Installation Questions]

RubyGems is the standard Ruby package manager. It's similar to apt-get, emerge, and other OS package managers.

[~]# cd /root
[~]# cd mkdir source
[~]# cd source
[~]# wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz
[~]# tar xzvf rubygems-1.1.1.tgz
[~]# cd rubygems-1.1.1
[~]# ruby setup.rb


Receive an Error output?

./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError) from ./lib/rubygems/custom_require.rb:27:in `require' from setup.rb:23

  • Check to see that you have all the libraries needed by rubygems/builder. Missing libzlib-ruby or libyaml-ruby in particular can cause this error. You may also need to install libdrb-ruby, liberb-ruby and rdoc.


Example:

[~]# yum install rdoc


Image:Ruby-gears.png With RubyGems loaded, you can install all of Rails and its dependencies through the command line:

[~]# gem install rails --include-dependencies
[~]# gem list --local



Image:Tip.png Back to How To Documents
Personal tools
Getting Started