moved connection to rakefile