While trying to setup the RoR with XAMPP on my windows 7 machine I encoundered an error
ERROR: While executing gem ... (Errno::EEXIST)
while trying to run
gem install rails --include-dependencies
Turns out none of the other gem commands worked.
The solution is simple, you need to run the command prompt with elevated privileges (run as admin) to get it to work.