I have the following line in my ActiveRecord model:
class Record < ActiveRecord::Base
has_many :users, :through => :record_users, :uniq => true,
I suppose you could call it a bug in ActiveRecord. PosgreSQL is a bit more restrictive than MySQL. You can help out ActiveRecord by setting up the association like this instead:
class Record < ActiveRecord::Base
has_many :users,
:through => :record_users,
:select => 'DISTINCT users.*, record_users.index',
:order => "record_users.index ASC"