Ask HN: Is Ruby on rails worth it to learn in 2022?

22 points by ahmaman ↗ HN
I'm looking into learning a new programming language or framework. I have only seriously worked with Javascript/Typescript for the past 6 years. I am hoping to find a tool that optimises for developer's experience and get me productive being a solo founder. Introducing a new approach to programming is a nice-to-have.

RoR and Djano seem to be frequently recommended, any thoughts? Other ones come to mind, maybe Clojure?

For some reason RoR doesn't seem to be as popular where I live (Finland) though.

21 comments

[ 3.9 ms ] story [ 60.5 ms ] thread
Yes, Ruby on Rails is worth learning. Especially if you are a JavaScript guy, a solo found and interested in the developer experience. Ruby and Rails give you a nice dev experience in my opinion and the way you use Ruby changed the way I do JavaScript too. You can also be rather productive as a solo developer in Rails so I think it is a perfect fit for you. Down the road when you are comfortable with Ruby and Ruby on Rails you might want to look into Python too. Not so much for web development but there are a lot of devops tools out there that use Python.

My background: I was a Python dev that worked PHP because that was the jobs I got (more than 10 years ago) and decided to invest more into JavaScript (2007) because I though it was going to be the future. When I couldn’t stand PHP anymore I got a Ruby job (because, still no Python web jobs back then) and it changed me fundamentally. I love Ruby and Rails till this day and Ruby, JavaScript and Python form the backbone languages.

Thanks for the recommendation, seems that many people share your experience. Any learning resources that comes to mind if you would learn RoR from scratch today?
I second that, RoR is worth it. Speaking of resources - https://www.railstutorial.org/ Michael Hartl's tutorial is still one of the best ones, although it's rails 6 not the freshest 7.
I had been working with ruby for the last 6 years, although my first experience with it backs to 2016. I used it in distinct stages of startups, in Canada, San Francisco and Sao Paulo. (from pre-seed to IPO)

From my experience there's a lot of room to build robust applications using the vast and mature ecosystem of ruby. I had the opportunity to work with api only, with react on rails, pure erb with vanilla js. Each with some pros and cons.

One of them was really interesting, based on lessons from Domain-Driven Rails, which I much appreciate for scaling busineses with high complexity in terms of rules.

Tooling today is quite mature too, even from simpler ones as VSCode or even RubyMine (unfortunately paid as opposed to other editions... Subject for another thread tho).

I'd highly recommend Ruby as a starting point for founders, cause there's no silver bullet indeed, however the speed and flexibility of a full featured Rails app today is impressive. Both for coding core app features, scripting and even fastly mungling data (let's be honest, it's quite common pivoting in early stages) using the rails console.

Yeah, single thread and stuff out of the box, but I'd guess that a startup having such a requirement in day 1 is 1 in a hundreds of thousands cases (I can be wrong, want your thoughts too folks).

Can you expand a bit on the perspective shift before and after picking up Rails? Asking as a full-stack JavaScript dev who recently started branching down this path myself.

One thing in particular that it's still really hard to get used to is keeping track of a whole discrete set of framework conventions while also making a first meaningful dive into Ruby to begin with. It's nice not having to, say, implement logins myself, but it's still a little mystifying how indistinguishable from magic that approach makes things looking at it from the outside. (But then again I guess when I first picked up JavaScript I wasn't also concurrently learning React or Express...)

The other big one that comes to mind is Laravel (PHP), heard good things. Node doesn't really offer the whole batteries included experience to this day, at least not as consistent as good as Rails does. I'm sticking with Rails.
In my bubble PHP gets a bad reputation, not sure how much that has changed!

About Node, I have been using NestJS[1] and quite like it! Definitely has a lot more functionality out of the box when compared to other options in the Node ecosystem.

1 - https://nestjs.com/

I’ve been eying NestJS as a framework for my node.js work. The difference I find between NestJS and Rails for example is that NestJS puts the things together that sort of crystalized out in the wider community to spare you a lot of the glue code. While Rails has a more cohesive feeling and there are a lot of third party plugins that solve a lot of problems you can have.

PHP gets a bad reputation everywhere, even if is less deserved nowadays. I am still not a fan, the syntax, the libs, the community, it’s not mine. My impression of the community is they have a chip on their shoulder because of the bad rep and the bad rep keeps most new devs away that could significantly change the community. They also are in denial that a lot of the “bad old code” is the main reason they are as huge as they are today and that a lot of people chose PHP back then because it was better (cgi) or cheaper (own server vs cohosting) than the alternatives.

It sounds like in comparison to NestJS, Rails third party "gems" (if I am using the right terminology) are easier to use out of the box without too much hustle integrating it with the rest of the framework? Perhaps also the third party's code follows more standard "Rails" patterns?

The community can make or break a technology for sure! Most devs I know would very much avoid interacting with PHP unless it is a must.

It is not just that. NestJS feels “cobbled together” out of what was already being used. Rails feels like one coherent thing and the plugins don’t break that much (well most of them). But the difference is that everything feels coherent in Rails.
I don't do PHP but the bad rep seems exaggerated, JAVA was also very bad 20 years ago compared to know. JS we all know. PHP as a community is surprisingly durable actually, seems like nothing will ever make it go away.
As someone that bet on Django early in their career before moving to angular.js and finally landing on React/Node.js: yes!

While I wouldn't personally use it for my own projects (since I'm productive in React/Node), if I had to start fresh again with what I know now, I'd pick Ruby on Rails.

It’s a very solid, albeit opinionated choice. Obviously, you’ll have haters criticizing its speed (e.g., “wHy NoT uSe Go”), but you’ll learn from a large community of devs that share great conventions (often making things much easier to maintain or change).

It’s also an amazing choice for launching an MVP because it handles, well, near everything.

For a novice developer, it’s one of my top recommendations for getting experience across the full gamut of web development.

If you're looking to solo found, yes Rails and Django are both great choices that will let you build extremely quickly.
I agree it's great for solo founders, but it also fits well with small teams that cover a lot of ground. When your team has to handle all the IT responsibilities, it's really excellent.

Hotwire is new, but it seems to cover the gap between applications that need modern front-end components, but don't need all the react/api/etc...

I went from Ruby on Rails, then Javascript/Typescript to finally land at Clojure in 2019 and I'm not looking back.

Clojure has been a perfect fit for my needs, very similar to what you describe, and neither Rails nor JS have been able to match that.

With Clojure/Clojurescript you get:

- sane, single lang for both backend and frontend (much more seamless than JS/node),

- REPL-Driven-Development - immediate feedback loop translating to huge productivity boost,

- a very refreshing approach to programming,

- access to both two largest ecosystems JVM, npm and of course clojure's own amazing libraries,

- vibrant and diverse community, converging people from all different programming backgrounds,

- much, much more.

Rails and Django are a bit tied to 2005ish MVC paradigm and while it's reliable and gets job done, it comes with compromises on flexibility and user experience - making it hard to be competitive in 2022 as a solo founder. Clojure on the other hand is known for empowering single/few developers to outcompete much larger teams.

Seriously, forget about Rails and Django and just focus on Clojure.

The last time I looked into the state of the art when writing web apps in Clojure, people were hand crafting SQL statements in the data layer, and the community seemed fine with this. Have things improved?
I'm surprised that no one has suggested Elixir with Phoenix framework. It is a modern re-imagining of Ruby/Rails with the Elixir language created by a former Ruby/Rails developer. It runs on the same BEAM VM as Erlang and has the same concurrency and distributed process supervision capabilities.

Being not as popular as Ruby/Rails I wouldn't recommend it for anyone who isn't comfortable researching some answers that aren't immediately found in search results.

Yes, Especially for a solo founder, Rails is an effective and powerful choice. It scales from "Hello World" to IPO and allows you to do 10x the work while focusing on your users rather than boilerplate and plumbing. Its also trusted by some of the biggest tech platforms such as GitHub and Shopify.

The creator of rails recently wrote a great article on how Rails is the perfect choice for solo founders here: https://world.hey.com/dhh/the-one-person-framework-711e6318

I also recently wrote a short article about how enjoyable it is to work in Ruby and Rails here: https://jmarchello.com/a-love-letter-to-ruby-and-rails

If you have any questions or want to talk more about learning Rails, DM me on twitter @j_marchello. I'd love to help.

I'm a solo Rails developer and I'm very happy with the productivity. ActiveRecord, as an example of Rails's power and opinionatedness, is extremely powerful. As an abstraction, it does occasionally "leak", and you have to look under the hood, but the ability to compose together code that compiles down to SQL is so much better than trying to compose together strings of SQL.

I think it's also worth looking at the Rails front-end story. StimulusJS is one of my favorite parts of the Rails stack (though totally usable elsewhere). Instead of ever again writing an event listener in JavaScript, you can write it inline in your HTML, using data-* attributes. It is to JavaScript what Tailwind is to CSS. I heard DHH in a podcast talk about the value of seeing your actions directly in the HTML, not needing to open your JS file to know what's going on. Stimulus and also Turbo definitely have an interesting place in the world and are extremely powerful when they're a good fit. On the other hand, I've still had use for React at times.

Outside of Rails, I'm excited to try Remix (https://remix.run/) because of its batteries-included approach and what seems like a novel approach to server-side rendering without all the work.