Fix gemfile and database config