Updating connection rb for rails 3.