```ruby
require 'activerecord-postgres-json/activerecord'
require 'activerecord-postgres-json/coders'
```

Load the patch after the ActiveRecord is loaded
user
```ruby
ActiveSupport.on_load :active_record do
  require 'activerecord-postgres-json/activerecord'
end
require 'activerecord-postgres-json/coders'
```
assistant