Add database copy for travis
Fix code for ruby 1.9