Cannot install a particular gem with rubygems 1.5

If I manually download https://rubygems.org/downloads/bwkfanboy-1.2.8.gem
file and run gem install -l
/where/is/bwkfanboy-1.2.8.gem everything is OK, but if I try
to install the gem from the network, e.g. gem install
bwkfanboy I'm getting an error: undefined class/module
YAML::PrivateType. Here is a backtrace: