This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Just about every convention in Rails can be overridden, so in theory you can always adapt to a legacy schema.
Having said that, there are times where this might get to be just too much of a pain. My advice would be to experiment with writing basic models that map any legacy schema you might be thinking of using, and seeing if it works, before comitting to the full application.