Fix Travis hang for rails3