I copied the vimrc file I had set up at work to my local Linux machine (Ubuntu Gutsy Gibbon), expecting to get the same experience. I quickly noticed that I was unable to autoformat my Ruby files. When I typed 1G=G (or gg=G) to indent the whole file, everything shifted to the left and all indentation was lost.
I adjusted the vimrc to reflect some settings other Ruby hackers seemed to be enjoying:
filetype plugin indent on
The line is bold is critical to my aim. I didn't have to set that anywhere under Windows for whatever reason. Once enabled, automatic indenting of many types of source code started working.