Firstly, your instincts about MongoDB are correct - it is not suitable for handling this kind of application.
Any decent RDBMS that has transactions is fine. Some will argue nothing less than Oracle will do, others with a pet hate of MySQL will insist on Postgres, but here's all you need to know:
Make sure columns holding financial data are DECIMAL and do not use FLOAT.
I can't stress this enough - if you use FLOAT, you will see rounding errors all over the place, and your boss will hate you. Just use DECIMAL, understand the DECIMAL type and use it.
You should also be aware that Ruby's floating point arithmetic is not quite what you might think it is (and I've seen all sorts of weird rounding errors), so you might need to monkey patch http://www.hans-eric.com/code-samples/ruby-floating-point-round-off/
I personally like MySQL (using InnoDB), but Postgres is fine, just use what works best in your environment.
In terms of the second part of your query, about "patterns", well, where to start?
I think you need to understand concurrency a little, as you'll need to understand why transactions and row-level locking are needed. Imagine this method used to make a deposit into an account:
def deposit(amount)
self.balance = self.balance + amount
end
This would trigger a SELECT (to get the current balance), we then do an addition and then an INSERT back into the DB.
Now imagine if in between the SELECT and the INSERT another process came along and did a SELECT. In theory, one of the deposits could be "missed" because it would be over-written by the second INSERT - that's why locking is important.
Some systems get around this by never having a column for the balance - it's derived from the total number of deposits and withdrawals. That obviously has performance implications.
Either way, if you have a ledger of some sort, you need to take this into account and understand it before you start writing code.
As to the final point, there are few decent open source accounting systems out there that are any good in my experience. Accounting normally requires an accountant, and few OSS developers have the skills to produce something that is up-to-date in terms of accounting rules and few accountants produce elegant code. That said, Lazy8web is looking promising to my eye, despite being PHP. It might be good to take a peek at the source and see where it's doing things you hadn't thought about doing things. Good luck.