How to use a long/bigint id in Rails applications?

I am looking for a way to use a long/bigint primary key instead of the default integer id.

I did some googling and there are some results (e.g. activerecord - How to use long id in Rails applications? - Stack Overflow), but I am not sure about the solutions and I don't want to have problems in a couple of months. Btw. I really want to use a standard mechanism and not a Rails hack, so that I can use the models without any special treatment.

Appreciate any help, Thanks.

Heli