Update Gemfile and fix tests