rails/rails — pull request #5565 by carlosantoniodasilva (2012-03-23 18:26:20+00:00)
Title: Fix build for branch 3-0-stable

Cherry-picked 1 commit from 3-2 - with conflicts - and added some specific fixes for 3-0. Please check #5557 and #5558 for detailed info.