You’ll want to start with Ruby, but fortunately for you, Ruby is a really benign language to learn. There are a few oddities, such as the differences between blocks, procs and lambdas and eigenclasses add a lot of magic (sometimes even voodoo), but you don’t actually need to know all those things to get started with Rails.
this really does and you’re set.
Somewhere along the way you’ll want to pick up SQL and relation algebra. Postgres does a few things differently, but those are easily Google’d. Unless you want to define a custom full text search definition or move logic from Ruby to PL/SQL, basic joins and aggregations will take you quite a way.
Getting this deep into Ruby on Rails development from absolute zero will be quite the epic journey…
Anyway, I highly recommend Why’s (Poignant) Guide to Ruby – it’s not as much a guide to Ruby as it is a programmer mentality self-test. If you’re not having fun while reading that, programming is probably not for you.