You can use either, I don’t think it really matters a lot to be
honest. I love postgresql, but I can’t really articulate why. If you
are really interested in DB constraints I’d recommend postgres simply
because it has excellent support (I admit I’ve never used any
constraints in MySQL).
Some Rails users say you shouldn’t have any kind of business logic in
the DB, while others advocate including some to ensure that the most
important part of your app - the data - is valid, even if you
sometimes violate DRY.
Rails makes it really easy to use either, and to switch out without
noticing a difference really. I imagine when you have to make a
decision between either one, it will be guided more by how you can
optimize it for your OS/hardware, you or your support team’s knowledge
of either db, etc. I don’t think it makes a difference which one to
go with for the vast majority of general Rails users.