Why is Ruby using 100% CPU in startup?

view story

http://unix.stackexchange.com – I installed GitLab on an EC2 instance a while ago, compiling Ruby from scratch: $ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] $ which ruby /usr/local/bin/ruby What's really strange is that whenever I start anything with this Ruby interpreter, such as a GitLab backup job, restarting the GitLab worker, etc. my CPU usage spikes to near 100% usage for a long period of time even before I see any output from Ruby. It seems that it's working so hard just to load the libraries required by GitLab. How can I debug this and find out what in the world is taking so long? I don't (HowTos)