Hmm... could we replace this with something like:

if require_succeeds?('action_pack') && require_succeeds?('action_controller')
  require 'global_session/rails'
end

It would be less brittle and mask fewer errors than the existing code, but it would retain the magical property (the caller does not need to activate the global session Rails plugin, it activates automatically if Rails is present).