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.,
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.