I said "the average user", not "all Mac users". It's the same thing with PCs - the 90% of people who aren't experts or ninjas or developers are web-itunes-facebook-email people. You may not know many of them, but that's a result of your professional and social circles.
Apple doesn't sell millions of computers every quarter to Rails developers, it sells them to 90%-ers. Sure, some developers buy them, but they're not the main market.
Don't underestimate the influence of developers and the tech elite jumping on a usable desktop Unix in the early 2000s. The first places I ever saw more than one or two Mac laptops in one room were developer meetups. And you know each of those influence purchasing decisions of their families and friends as a trusted source. If OS X didn't have Unix underneath I would need three hands to count the number of people I would not have told to buy a Mac because I wasn't using one and loving it at the time.
Yeah, I'm not saying high-end tech-savvy users never did anything for Apple (I bought my Macs for largely the reasons you describe), but when Apple makes commercials, they're not advertising "the most usable Unix-compatible OS in the world", they're advertising "it makes web and media and lifestyle stuff really easy".
Talk to some Rails developers, I will bet my nuts that none of the experts, ninjas, you name it are developing on a Mac.