Fixes for Rails 4 database setup; fix Rakefile for Rubygems 2.0