Personal tools


From MohidWiki

Jump to: navigation, search

Rubygems is the extension manager for ruby. Much like cpan is the extension manager for Perl. Gems is more than a packaging manager: it's a library versioning manager too! That is also it's achille's heel.


Requires ruby to be installed prior.

Install rubygems

> wget
> tar -xvf rubygems-1.1.1.tgz
> cd rubygems-1.1.1
> ruby setup.rb

Install extra-packages for gems to work correctly

> sudo apt-get install ruby1.8-dev

To configure gems on your system you need to set the environment variable RUBYOPT. This will preload "require gems" to every ruby script you run.

>vim ~/.bashrc
.bashrc> export RUBYOPT=rubygems

Popular gems


xmpp is the open protocol behind the jabber service.

> sudo apt-get install libopenssl-ruby
> sudo gem install xmpp4r -y


> irb
irb> require 'xmpp4r/client'


> sudo gem install xmpp4r-simple -y


> sudo gem install twitter -y

External references