Fixed Rails dependency ordering