My biggest WTF’s:
- Spring almost causes more problems than it solves for an experienced user. For a new user it can be a total nightmare, and should not be included by default.
- Likewise with Bootsnap. Although it’s less common, Bootsnap can cause truly awful bugs that are confusing as hell. This is more likely when switching Ruby versions, or using Docker.
- Webpacker + Sprockets. There should not be two asset pipelines, but Sprockets is so much simpler that I don’t blame anyone for keeping it. Webpacker even seems over-complicated compared to a plain old webpack.config.js setup. Knowing webpack, I don’t understand webpacker. Knowing nothing, I would be doubly confused. We definitely need to be moving toward webpacker, but it really needs some UX improvement AND it should probably take over app/assets, not add app/javascript.
- Form Objects. Why is this so weird and confusing to do in Rails that almost every project uses a form object gem of some kind? Form objects should be a first-class feature of the framework.
- Turbolinks. Turbolinks can be great for some projects. I buy some of the Basecamp koolade, and prefer not to write SPAs if I don’t need to. But for a new user it’s a massive source of confusion. I’ve seen it screw up experienced coders, who write awful code basically just to work around it. It makes lots of off-the-shelf widgets require extra vigilance and vetting to see if they cause any issues.
Then we get into minor stuff:
- I think every project I have ever worked on has needed authentication, and often a separate admin area. Rails should at least provide some guidance here even if Devise is not be included by default.
- On the flip-side, too many gems are included by default now. Slows boot time, confuses newbies. Many projects don’t need ActionMailer, ActiveJob, ActionCable, the rich text editor, etc. Should all be commented out in the Gemfile and opt-in IMO. I am less upset about this, because Rails is omakase and that’s fine.
- If it’s not already gone, please get rid of CoffeeScript. It used to be nice, but has since been made obsolete by ES6 and other better compile-to-JS languages.
- ActiveJob has way too many stack frames. It’s ridiculous to debug.