Rails developers use Macs, because:
- Mac UI looks nice. 2007, when the Rails hype started, Ubuntu was not quite as good looking as it is today.
- Mac has a powerful terminal and package manager, similar to Ubuntu.
- Mac can run Mac Office which is important if your company uses an Exchange Server.
- Mac can run Photoshop which is important for designers. UI designers need to be able to run the Ruby applications on their computer for immediate feedback.
- Many Rails/Ruby gurus use Macs and have Mac specific code/instructions on their blogs.
If you are a backend developer that uses IMAP you can happily use Linux. Frontend developers tend to use Photoshop and thus use Macs. Because many Rails developers have to provide the whole stack (all-in-one developers) they use Macs.