Did you try a good tutorial? Rails is structured in a way that fits from very small to very big web projects, but it's not structured to be learned just from reading the automatically generated code - that for sure would make it look crazy at first.
Eg for "Hello World", you're not going to touch 99.9% of the auto-generated code. But you need to know where to look.
I did try some tutorials some years ago, but Rails is kind of library that wants you to know it well, and doesn't lend itself to an explorer type like me. The gap between hello world and production code is wide and I couldn't find documentation to help with that process. Probably that was my fault. Something like Flask or Sinatra does not require you to know an ORM before exploring what sort of data structures you'll want to use. I guess it's just that sth like Rails does not cater to people who like to learn their tools while actually using them, and never before...
My problem is that much of the time I don't know where to look. I'm not a great programmer, so maybe that's why, but the few times I tried to grok the innards of, say, ActiveRecord I gave up fairly quickly.
I think that a very few share of Rails programmers need to know the innards of ActiveRecord - I use and abuse it heavily, and never felt that need. When things get difficult to optimize, I fall back to hand-written SQL. I spent a thousand times more time studying the innards of PostgreSQL than AR :)
I think the point is, Active Record (like any orm) is a leaky abstraction that covers a small, but common percentage of what you can do with SQL. Any time I've run into problems fighting the "magic" of Active Record, my time was almost always better spent just taking back to hand written SQL (which isn't terrifically difficult with Rails).
Rails absolutely is a framework where you need to abandon some control and trust the framework though. If you need to know exactly how your abstractions work under the hood, it's a poor choice IMO. I doubt there a single person who has comprehensive knowledge of how every single part of Rails works.
Couldn't agree more. Invest a bit of your time gradually learning more SQL and your life will be easier no matter the backend / ORM.
SQL is really not going away anytime soon (it's demise has been falsely predicted many many times). It even fits the current language hype in that it's functional!
> I'm a bit of a control freak, so this lack of insight into the innards makes me (quite possibly unreasonable) uncomfortable
Ok, that could be the reason why you don't like Rails :)
Regarding postgres, its innards become relevant when you have partitioned tables with billions of rows and need to run queries on them for analytics purposes. In these cases you often need to manually create some complex queries from scratch; other times, you can use ActiveRecord "magic" up to a point, but then you either need to add special indexes (eg partial indexes, that saved my ass many times), or you need to replace the automatically-generated queries that ActiveRecord uses and which are good for small numbers, but become a bottleneck when scaling.
Eg for "Hello World", you're not going to touch 99.9% of the auto-generated code. But you need to know where to look.