class Rails::Engine::Configuration

def gem(name, options = {})

behave correctly for this deprecation.
Rails 3, by default, uses bundler, which shims the Kernel#gem method so that it should
def gem(name, options = {})
  super name, options[:version] || ">= 0"
  require options[:lib] || name
rescue Gem::LoadError
  msg = "config.gem is deprecated, and you tried to activate the '#{name}' gem (#{options.inspect}) using it.\n"
  if File.exist?("#{Rails.root}/Gemfile")
    msg << "Please add '#{name}' to your Gemfile."
  else
    msg << "Please update your application to use bundler."
  end
  ActiveSupport::Deprecation.warn(msg, caller)
  exit
end