ConnectionSpecification has moved in rails4
Load only what we need from rails
Don't use deprecated .first in rails4