Ruby source file indenting in Vim

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: behave mswin syntax on filetype plugin indent on set nu set showmatch set ai set et set sw=2 set sts=2 set ts=8 set hls colorscheme slate set columns=140 set lines=35 set backup set backupdir=~/.vim/backups

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.