```ruby
when_library_loaded('ActiveSupport', :version_file => 'active_support/version') do
  require 'rails2_ruby2/i18n_patch'
  require 'rails2_ruby2/compressed_memcached_store_patch'
  require 'rails2_ruby2/erb_util_silence'
end

when_library_loaded('ActionController',
   :lib_const_string => 'ActionPack', :version_file => 'action_pack/version') do
  require 'rails2_ruby2/named_route_collection_patch'
end
```

Load the postgresql adapter extensions when ActiveRecord is available.
user
```ruby
when_library_loaded('ActiveSupport', :version_file => 'active_support/version') do
  require 'rails2_ruby2/i18n_patch'
  require 'rails2_ruby2/compressed_memcached_store_patch'
  require 'rails2_ruby2/erb_util_silence'
end

when_library_loaded('ActionController',
   :lib_const_string => 'ActionPack', :version_file => 'action_pack/version') do
  require 'rails2_ruby2/named_route_collection_patch'
end

when_library_loaded('ActiveRecord', :version_file => 'active_record/version') do
  require 'rails2_ruby2/active_record/postgresql_adapter'
end
```
assistant