Fix for accessing connection config in Rails 3.0

Also improves the usage of the gemfiles for specific versions.