Comment by trevor-e

1 year ago

I really want to try Rails, but the main selling points to me were the fast scaffolding and opinionated structure. With the advent of AI editors, are these points still relevant? Last I tried, CursorAI struggled with Ruby due to the lack of types. It seems like nowadays you can be nearly as productive with Node + Typescript + Cursor.

edit: care to explain the downvotes for asking a question?

I hear you. I use Cursor editor. I work with all of these technologies: Ruby on Rails, React, Next.js, Django, vanilla JS, jQuery, HTML/CSS, Tailwind...depending on the project.

I just spent the past week working on a hackathon where I built the project using a Node.js closed-source platform that uses Fastify edge functions and Cursor's autocomplete was terrible. Much worse than what I'm used to when Cursor makes autocompletion for Ruby/Rails code. JS libraries come and go every day. This makes it difficult for Cursor team to update their LLMs to provide good autocompletion. On the other hand, Ruby and Ruby on Rails have seen very few radical syntax changes. The syntax and majority of the API has remained the same.

Ruby on Rails is so much more than just fast scaffolding. The code I've written a decade ago in Ruby on Rails, I can still pick it up today and understand the project. I can also pick up anyone else's project and figure out the intricacies of it much faster than I'd ever be able to do in say Next.js or Express project. Express feels like writing assembly (no hard feelings).

I've, unfortunately, recently started working on a project that's written in Django. I thought Django is just Ruby on Rails for Python. Boy was I wrong... But that's a story for another time.

IMO Ruby on Rails is an absolute king! However, I'm looking forward for a day when I'll be able to use one language on both frontend and backend, while having the same simplicity and functionality as Ruby on Rails. (I'm looking forward for Ruby on Rails JavaScript successor, but it's just not there yet.)

  • Nice, so Rails does work well with Cursor? I'll give it a try then. Like you said, maybe it just struggles on random Ruby code but not Rails which has a ton of existing examples to go off of.

    • It does super well except for generating views, the FE story of Rails is still incomplete but depends on the use-case

Very much. I still heavily use rails generators as the defaults do quite a bit already. Generates nice forms, models, migrations, jobs, scripts, and test files. It doesn't feel much, like it's just generating a bunch of files with basic defaults in the right folder, but when you do that quite a bit overtime, you appreciate how little you have to think about those things.

I asked Claude some questions about rails and I thought it was helping, but then I switched to working through the Blog example walkthrough on the rails website.

Understanding the "why" and all the default conventions really makes you get what's going on.

I guess my thought is, understanding an app is still important, and rails helps you understand easily.