If you're just setting out learning programming it's a very instructive experience to set up a Linux environment anyway. With modern machines you can "virtualize" an operating system -- basically running linux as a program inside windows -- which gets rid of a bunch of the hassle involved in maintaining a linux desktop. I'd start by installing Ubuntu desktop inside Virtualbox and getting a rails environment set up there. This will give you a much more frictionless rails experience and you'll get to learn a bit about linux in the process.
You may end up buying a mac later on, but there's no reason to delay learning about rails just because of it. Just get started with the Virtual machine, learn a bit about linux, and go from there. Many professional rails developers use linux VMs on their Macs anyway.