If Rails version is in Gemfile, use it

and process Gemfile before config, because config location
depends on Rails version.

Fixes #398
Merge pull request #402 from presidentbeef/use_gem_version_of_rails

If Rails version is in Gemfile, use it