Fix dependencies with several rails versions