Loosen dependencies for Rails 4.

Change-Id: I521fdc09b3eab59a60b9a30eee6f1f30fc0f1288