Depend on the railties gem rather than the rails one

Some Rails projects do not rely on Rails, like those not using ActiveRecord. We shouldn't force those projects to download unnecessary gems.