RubyGems is a package manager for the Ruby programming language.
Since you're most likely a non-privileged SDF user, you cannot install gems the traditional way. This is due to the fact that gem install GEMNAME tries to bulk update its cache of available gems at gems.rubyforge.org which will exceed your RAM quota. You should thus setup the 'gem' command to install gems locally:
$ mkdir ~/.gems
$ cat << EOF > ~/.gemrc gem: --no-ri --no-rdoc --local # Local install, but don't generate documentation gemhome: $HOME/.gems gempath: - $HOME/.gems - /usr/pkg/lib/ruby/gems/1.8 EOF
$ cat << EOF >> ~/.profile export GEM_HOME=$HOME/.gems export GEM_PATH=$HOME/.gems:/usr/pkg/lib/ruby/gems/1.8 export PATH=$PATH:$HOME/.gems/bin EOF
gem help install and the online documentation are your friends.