Phusion (makers of Ruby Enterprise Edition and Phusion Passenger) definitely make a profit.
I think they basically just do it through consulting + a little support and training. (See http://phusion.nl/services). But since they wrote Passenger and REE, I'm sure they can command a very high rate.
And the software that makes Google their money is proprietary, unless you can show me the link to the AdWords server source.