Change rubygems to secure version
Fix rare race condition on ruby 2.0 for monitor