Update to secure RubyGems and fix possible missing dependency on Rails 3.2.12