> If you're charging for your app - which you should be in a lot of cases
I think it really depends. Many of the most successful businesses thrive purely on ads. Also you'll have to consider which market you're targeting. In the US many people maybe are used to paying a reasonable amount, but in many developing countries people just won't use it if it's a paid app.
Even then I think it is a hard sell.
Lets say that the gain you realize from writing in another language is 10% of your infrastructure costs. It might not matter day one. At some point that will represent a significant sum of money, in either absolute or relative terms.
Premature optimization and all that... Worry about it when it looks like it might matter.
Worry way, way more about building the right product at the right price for your customers, and adding the right features.
This is a critical aspect.
If it's purely ad-driven, you probably have very little money coming in for the number of pages you crank out, so you need to optimize them a lot.
If you're charging for your app - which you should be in a lot of cases - then something like Rails is likely ok.
The latter case is much more likely outside of Silicon Valley/VC-fueled startups.