|
I don't object to the "find the right way" comment, with one clarification: he's talking about the web framework. Ruby is just fine for "just wanting to get it done"; we've used it to write an assembler that models opcodes as Ruby objects, a binary format description language, 3 different debuggers, a web proxy, a hex editor, a whole slew of crypto, a testing framework for the FIX trading protocol, Cocoa UIs, and god-knows-what-else. If you looked at any two of those packages, they might not appear to be written in the same language, let alone the same team. Rails does not care what crazy Ruby stuff you have built for your specific problem domain. If you are doing graph-theoretic modeling with a custom Ruby library, Rails does not care and it will work fine. But. If you have even the slightest difference of opinion with Rails as to how to handle a request or represent the URL parameters you're getting from browsers, you're in for a world of hurt. The things Rails has opinions about, it has strong opinions about. And it's a total passive-aggressive asshole about those opinions. It doesn't say no. It slowly punishes you instead. In particular, even though Rails 3 advertises that it has swappable ORMs, you'd be crazy to consider anything but ActiveRecord. The nice thing about losing degrees of freedom is that you don't have to make decisions about them, so I tend to reject the idea that Python gets you home to your kids faster. |
What I really, really should have done was write a thin wrapper over the existing Redis code implementing the three methods I typically need my cache stores to support (read, write, fetch -- that's it), then configured the cache stores on class load from a YAML file. This would have gotten me done in an hour.
Instead I tried spelunking deep into the dark recesses of Rails 2.3.10, how it loads environments and initializers, and two gems to figure out what was going on... and very nearly had to postpone shipping because of it.
Don't do that.
But when I'm doing things the Rails Way, yeah, pretty much peaches and cream. I've never had an issue with writing arbitrarily complex Ruby code to do things that are not in the "typical web application" purview.