How much Ruby / Rails knowledge for Discourse development / recommended reading?

I’m contemplating diving a bit deeper into Discourse development (both plugins and themes), but it’s been a while since I worked with Ruby and more generally also since I did web development (I still work in software engineering, but it’s mostly ABAP/SAP-related these days). So I was wondering how much Ruby and/or Rails knowledge is required/recommended?
My surface-level research has indicated that Programming Ruby 3.3 (Pragmatic Programmers) would be a good start for Ruby, and they also have a book about Rails (Agile Web Develpment with Rails 7, with a new version for Rails 7.2 coming next year).
But maybe people with a bit of experience here can comment on what they used to get up to speed with Discourse development (and if anyone has read the books above, I’ll gladly take any reports about their quality).

I did a fair amount of work on import scripts before I read Programming Ruby. It did help quite a bit. I think that’s also the same Rails book I read. I don’t think it’ll hurt.

That said, depending on what it is you’re trying to do, you can get pretty far by just finding some examples to follow. You can grep GitHub - discourse/all-the-plugins and find lots of examples.

And understanding rails definitely helps, but knowing that you can call add_to_serializer to add stuff to the serializer is something that you won’t find in a book (or at least any book I know of).

3 Likes

Thanks!
Import is indeed one of the first thing I’ll have a look at (though, luckily, a member of our community stepped up to support here, so it won’t be all on me anymore). But mid-term I’d also like to take closer look at building smaller theme-components or plug-ins for things like having an opt-in to display external media previews or automatically using grid view when people upload multiple images (I hope some of this ends up in core eventually, but my impression is that there’s a lot on the roadmap, so it might take a while).
And since we will self-host, I had the impression that it doesn’t hurt to have a bit more knowledge when troubleshooting issues (at least on the same level that I have for the current PHP-based forum).