Fix gemspec dependencies and update gemfile template