ruby interpreter dies with system popup message

I sometimes get this message on a dev box I log into remotely:

Ruby Interpreter (CUI) 1.9.2p180 [i386-mingw32] has stopped working

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

A note on my latest test with this problem is that if I run the upload script that uploads pdf files to the rails server and try to access a web page from a browser on the server while that script is running, it seems to cause the problem. If I just run the script without accessing the web page, it seems to be ok. It seems like it's related to system load in some way is my impression ..

This whole system is eventually going to linux at some point, so hopefully if that happens the diagnostics will be better then ..