I kept getting this error in my ruby env on Dreamhost, open this post will be the final answer to it.
To install rubygems, after done ruby install,
- wget rubygems from http://rubyforge.org/frs/?group_id=126,
- ruby setup.rb –prefix=$HOME
- add export RUBYOPT=rubygems to $HOME/.bash_profile or .bashrc on your preference, you wanna chain them together anyway.
- add . ~/bashrc to ruby shell script if it’s in crontab. (This is new to me after migrated from ruby 1.8.5 to 1.8.7, I might forgot something simple during migration. According to this post, this is the standard way in crontab.)