What's New in Ruby on Rails 8

403 pointsposted 7 hours ago
by amalinovic

181 Comments

Kerrick

5 hours ago

Ruby and Rails really seem to be going through a renaissance lately.

- The pickaxe book, Programming Ruby, has a new edition this year covering Ruby 3.3

- The Rails Way is being updated for Rails 8 and is available in pre-release, and will have two companion books

- A new title, Rails Scales, is being published by PragProg and is available in pre-release now

- YJIT has made Ruby fast. Like, _FAST_

- Rails has a bunch of new features that cover the "missing middle" levels of success

- Ruby has a bunch of new and new-ish features like Data (immutable Struct), pattern matching, Fibers and Ractors, and more.

I had largely moved on from ruby into the world of front-end applications by 2013, but now I'm excited about the prospects of diving back in.

bradgessler

5 hours ago

I'm optimistic about Ruby's async story with the work Samuel Williams has been doing. https://github.com/socketry/falcon is the tip of the iceberg, which is built on top of https://github.com/socketry/protocol-http2 and a not of other repos at https://github.com/socketry.

It's inspiring other's in the community to think of interesting applications, like using the HTML slot API to stream responses to HTML without JS. https://x.com/joeldrapper/status/1841984952407110037

I know other frameworks have had asynchronous IO support forever, but it's finally coming to Ruby that seems like it will stick around and be well supported.

ksec

4 hours ago

My only concern is that none of his work is being picked up by Rails. As a matter of fact, it isn't just SW's work, the whole async story on ruby, it seems neither Fiber or Ractor has reached any mass adoption.

byroot

3 hours ago

So first it's a bit annoying to read this when I busted my ass for several weeks to refactor Active Record to make it more compatible with the Fiber use case in 7.2.

But also there is very little benefit to it for the vast majority of Rails applications out there.

Unless you are doing micro-services or something like that, your typical Rails application isn't IO heavy enough to run more than 2 perhaps 3 threads before contending.

So the overwhelming majority of Rails applications wouldn't see any benefit from being served via falcon, quite the opposite.

Async is great to enable some use cases where people would have to reach to Node before, but Rails will never be a good solution for that, if you want to do some sort of light proxy or websocket notification thing, Rails isn't a good solution, you want something much lighter.

bradgessler

4 hours ago

There's various PRs where Fiber adapters are making their way into the Rails stack. Rails 8 added a ton of support for Fibers, with the exception of ActionCable. There's a PR open for that, which I assume will land sometime soon.

Rails has been really slow to pick-up async/http-2. They don't know it yet, but Falcon and all async libraries Samuel is working on will probably be a huge them 1-2 years out when more people find out it means less infra has to be deployed to production environments. Right now folks are happy to deploy without Redis™ with the Solid stack, but a lot of that won't be needed if proper async support is baked into Rails.

There's been a lot of Fiber features being committed into the Ruby language that I barely understand, but have improved all of these async libraries over the past few years. That's finally starting to bear some fruit for people like myself who don't really understand all of those details, but understand the benefits.

It will happen, but these things tend to play out more slowly in Ruby, which is a feature or a bug depending on how you look at it.

byroot

3 hours ago

> They don't know it yet,

This is so condescending... We perfectly know about the pros and cons of the fiber scheduler.

It's a very useful stack, but people, and you in particular, really need to stop selling it like it's the best thing since sliced bread. Async isn't a good fit for everything, and it's certainly not a good fit for the overwhelming majority of Rails applications.

frostymarvelous

4 hours ago

That's not completely accurate. Rails 7.2 added fiber support.

Only action cable still doesn't fully support falcon using http 2. But that's coming soon as well.

brightball

4 hours ago

My assumption is that’s due to the use case benefits for it.

More concurrency is not always ideal, especially if you’re not in an environment that guarantees you won’t have negative impacts or runaways process (BEAM languages, etc).

Rails projects are typically so hardwired to use a background queue like Sidekiq that it becomes very natural to delegate most use cases to the queue.

game_the0ry

5 hours ago

I would argue - its not a comeback, it was always the "king" of web dev.

Seriously, other projects can use its success as a reference for implementation.

And I say this as a front end dev.

brandall10

5 hours ago

As a Rails dev from 2011-2018, having returned over the past year, it def seemed there was an exodus in or around 2015.

Part of it was due to the rise of SPA and Rails difficulty working with those (webpacker, anyone?), part due to poor perception of Rails 4, part due to newer options such as Elixir/Phoenix or Golang rising in popularity for backend work, part due to many of the leaders such as Yehuda Katz moving on.

Also watching from afar on HN, it seems like Rails 7 release was perceived as a sort of comeback, with quite a few articles posted in recent years praising the framework for a return to relevance.

princevegeta89

3 hours ago

Tried GoLang and also used Phoenix for a massive project which went well. But we had problems onboarding new folks into it and some junior and even senior engineers went bonkers trying to get their heads around FP and the elixir language in general. I would say it worked great for me, but the problems and the curve of learning for others in my team made it feel like Elixir creates that gap for teams in general.

Go is good, but again I only tried it long ago and can't comment it for what it is today. I loved Ruby but I find it hard to go back to it after my experience with Elixir and Typescript. I was hoping for Crystal to go to great lengths but it doesn't seem to be the case at all.

ch4s3

3 hours ago

You do need to set some rule when onboarding people into an Elixir application. Not everything needs to be a GenServer, and please don't endlessly nest Enum.map calls.

nicoburns

4 hours ago

> part due to newer options such as Elixir/Phoenix or Golang rising in popularity for backend work

I suspect Django and Laravel have taken a chunk of the market as like for like replacements.

silenced_trope

an hour ago

I also noticed an elitism from other devs when it comes to Rails devs. I literally heard on multiple occasions "we don't hire Rails devs here!" followed by a laugh.

Of course it was tongue in cheek, if the candidate is amazing yes they're a hire.

But it spoke to a reputation that Rails devs had seemingly received. I think because prior to JS/Node, it was Rails that offered newbies the fastest path into web dev.

I don't believe this is the reason for any sort of exodus, but the negative perception may be partly a reason for devs choosing other frameworks.

mdaniel

5 hours ago

> - YJIT has made Ruby fast. Like, _FAST_

Then I pray with all my heart that GitLab moves to it, because that's one of the major complaints I hear about folks who use their web interface. Even while I was visiting the site to look up whether their main repo had a .devcontainer folder in it, I could just watch all the stupid ajax-y shit spin endlessly in what is conceptually a static table (sure, it changes per commit, but they're not a stock ticker platform)

OT1H, I know, I know, "MRs welcome" but OTOH as a ruby outsider getting the dev environment up for contributing to them has been a lifelong struggle. Now that Rubymine has support for .devcontainer maybe it'll work better

jwcooper

4 hours ago

I'm not saying GitLab is poorly designed, but a poorly designed website will be slow on the fastest of languages or frameworks. It's not necessarily a Rails or Ruby problem here.

ksec

4 hours ago

>Then I pray with all my heart that GitLab moves to it,

YJIT does make Ruby fast, but that doesn't mean it makes _Rails_ fast. (yet) At least dont expect multiple times improvements.

Hopefully in the future.

byroot

3 hours ago

There's plenty of reports of YJIT lowering real world Rails applications latency by 15-30%.

There is also plenty of perfectly snappy Rails applications out there. People need to stop blaming the framework...

mattmcknight

5 hours ago

Well, a lot of those pages have Vue application running on them.

paulddraper

2 hours ago

GitHub has always been fast for me.

agumonkey

3 hours ago

Interesting that both ruby and python are on the jit path. less is more.

btown

2 hours ago

I think there's a new and healthy rivalry between Ruby, Python, and JS for web backends!

- Ruby and Rails now has all of the things mentioned above and more. I do have concerns that Rails will evolve in directions where bundled frontends have less official support, with the continued centralization of 37signals/DHH [0] and their controversial removal of Typescript from Turbo [1] (and bundling in general for Hey), but it's such a large community that there will be continued momentum in all directions.

- Python used to be the choice if you expected to do both data processing/machine learning/NLP and web backends in a centralized codebase with a single language. And Django is still a world-class solution there, with gevent + asyncio + forthcoming developments on GIL-less Python all contributing towards making Django a highly performant and parallel framework. That said, with much of an app's data processing complexity often best offloaded towards LLM-powered solutions that have dedicated APIs, and both Ruby [2] and Node having bindings to https://pola.rs/ as an alternative to Pandas, it's no longer the only solution.

- And on the JS end, frameworks that enable full-stack batteries-included admin-out-of-the-box development like https://redwoodjs.com/ and https://www.prisma.io/nextjs + e.g. https://next-admin.js.org/ continue to evolve. Nowadays, if you're building a complex web application from scratch, Prisma provides all the escape hatches you'd need, so that you can build entirely in JS/TS and have the facilities you'd expect from Rails or Django.

I'm really excited that all three communities are continuing to push the boundaries of what's possible; it's amazing to see.

[0] https://news.ycombinator.com/item?id=30600746 [1] https://news.ycombinator.com/item?id=37405565 [2] https://github.com/ankane/ruby-polars

int_19h

5 hours ago

IMO the biggest problem with Ruby is still the docs. When you look at https://www.ruby-lang.org/en/documentation, you see a bunch of books - some of which are considerably out of date by now - and the official "API docs". For some mysterious reason, all the actual language features are also listed under API: https://docs.ruby-lang.org/en/3.3/syntax_rdoc.html. Worse yet, there's no proper table of contents - you get a kind of index on the left, but it's alphabetically sorted, and things on the same level are often unrelated. Compare to Python, where you have https://docs.python.org/3/reference/index.html that one can just read in order and end up with a very good understanding of the language.

mooktakim

5 hours ago

those old books are still good though. There's only new syntax for latest ruby versions.

int_19h

5 hours ago

If you compare, say, C++03 and C++14, it's also technically true that "there's only new syntax", but in practice this often means that hacks that used to be idiomatic before are frowned upon now.

nextos

4 hours ago

Ruby has evolved slowly language-wise compared to C++, or even Python.

Most changes have been in libraries and interpreter / VM implementation.

Updating your knowledge from Ruby 1.8 (mid 2000s) to 3.x (current) takes little effort.

But yes, sparse API documents were always a problem because a big chunk of the community was Japanese.

mooktakim

5 hours ago

Its not anything like that. new ruby version has "better" short hands, like {:test => 123} to {test: 123}.

Anyway, there have been updated versions of the books and content online if people are interested.

uticus

3 hours ago

Ruby dev for several years, I agree with this. It’s a frustrating point, especially after you learn the language and want to use the API docs as a reference. And I say that as a fan of the language.

temporallobe

6 hours ago

I work on different projects that use with Rails and others that use a microservice-based architecture, and while the trend has been to encourage avoiding monolithic architectures like Rails, I can say that I highly appreciate what it provides at its core. I love that the Rails team continues to trudge forward to add value and improvements despite the trends.

HatchedLake721

5 hours ago

> the trend has been to encourage avoiding monolithic architectures like Rails

I'd say's it's completely the opposite.

Yes, microservices might've been the trend in late 2010s, but after everyone got burned by it with unnecessary complexity (unless you're at "Google" scale), people just went back by being productive building modular "monolithic" architectures, and using "microservices" only when absolutely necessary.

zeendo

5 hours ago

Surely one can imagine a middle ground between one giant monolith and a huge mess of microservices?

matt_s

4 hours ago

In some ways its more about organization of humans doing the work. Breaking some piece of a monolith off into its own application, not micro-service, has advantages that you avoid having to deal more than a 2 pizza team size on an app. Sometimes the business grows and you go from startup idea one-app-does-everything implementations into needing more de-coupled, single business responsibility organizations of code.

I suppose places like Spotify or Github may have good practices around working on large monoliths but I would think that takes a lot of effort to get right and may have trade-offs.

brightball

4 hours ago

This is correct.

It was always more of a team organization solution than a system architectural solution. Leaning into it too much on the latter created a lot of complications for the former.

noop_joe

an hour ago

Totally, I think there's a lot of retroactive justification for what's familiar whether it be microservice or monolith. They both have advantages and disadvantages -- we're at a point where deploying and running either is available on most clouds.

That said, I think interesting possibilities exist where the two approaches are blended. I work for a cloud [1] that supports a concept of "services" grouped within an app each of those services is a web server that can be configured to sleep [2] under specific conditions -- effectively serverless but without the loss of shared memory and all the efficiencies of running a more traditional web server.

The grouping of services also provides a way to spin off parts of an application while keeping it within the same deployment process.

1. https://noop.dev

2. https://noop.dev/docs/sleepy-services/

moritonal

5 hours ago

Depends what you wanted from Microservices. If all you wanted was scale, then Rails ActiveJob solves that very effectively allowing you to scale your job-runners.

If you're looking for the "mindset" of microservices, where you store the data separately and impotently, then I believe Rails discourages that mindset.

berkes

5 hours ago

I keep hearing this "microservices to allow scale", in which "scale" implies performance, as some counterargument against microservices.

Honest question, who ever seriously proposed microservices to improve performance? It doesn't take a lot of thought to figure out that microservices have overhead that will always put it in a disadvantage over a monolith in this regard.

The only "scale" that makes sense wrt microservices is that of the scale of teams, and manage-ability of the scale of features and codebase. They are primarily a solution to "too many people working in too many poorly bounded domains". But as a solution to performance problems? Is it really proposed as that?

singron

4 hours ago

This was seriously proposed by some. E.g. "scaling services independently"

Scaling services independently is usually a recipe for outages where something is at the wrong scale. Sometimes you want to separate workloads that don't fit the request response model well because they take too long or use too much CPU or RAM, but you don't need micro services to get that benefit.

I don't think anyone was claiming it would lower latency for typical requests except maybe indirectly through materializing views in event-driven architecture.

I think the steel man has been about scaling teams, but the discourse was not limited to that.

closeparen

3 hours ago

The idea of reserving some capacity for specific workloads make sense, but that's mostly a load balancer / job scheduler configuration thing. The latent capability to serve other workloads physically hanging out in the same binary is really unlikely to have a material impact, if you're not sending it any work.

spyckie2

4 hours ago

It was proposed in the sense that Ruby, or python, or whatever webserver language you used (Perl, php, even JavaScript) was slow, single core, synchronous, database blocked, or whatever else made it “unscalable” and you built this tiny service that only focuses on your core bottlenecks like an api call that only returns coordinates of your map position on things like aws lambda.

Then for some reason some junior engineers thought that you could make everything an api call and you can make services in the most optimal language and glue them all together to have functional “scalable” apps.

And thus the horrors of being a web dev in 2016+ began.

Of course it didn’t help SPAs were encouraging backends to be decoupled from front ends and completely hidden in their implementation so the fact that “it was now possible” enticed backend devs to experiment with multiple api services.

berkes

4 hours ago

Well, Ruby (on Rails) is slow, single core, synchronous, database blocked and hard to scale. But certainly almost everyone realises that's not a feature of it being a monolith, but comes from it's language/stack/paradigms (AR, template, dynamic, JIT etc)?

I have, certainly, replaced some endpoints in Rails apps with lambda's, rust, or even standalone sinatra services for performance reasons.

For example an endpoint that generated "default stable avatar pngs" for new users: Ruby just isn't cut for image generation and manipulation. Rewriting that in a stack that performed x100 in this use-case (we picked rust) took a lot of heat off the cluster of servers.

Or moving the oauth and registration to a separate rails app that served these pages - the only endpoints that did HTML. Allowing the "main" Rails app to remain leaner by not loading all of the templating, and other HTML middleware in memory when it would never be used.

In that sense, I guess, monolyths can have a performance disadvantage: they require the entire app to load stuff for that one endpoint or feature even if 99% of the requests and users never use that.

Like the "PDF generation for reports" we once had, that was rarely used but still loaded in every running thread that would never handle anything related to reports or PDFs. Extracting that to a separate "PDF report generation worker" freed GBs of memory on almost all servers.

imhoguy

4 hours ago

Modulith - you still program app usually as single repo project, but you take care about code level modularization so in any case you are able to simply extract separate (micro)service.

noworriesnate

5 hours ago

A modular monolith is distinct from a "plain" monolith. It's a good middle ground for most web services.

crabmusket

4 hours ago

What's a "plain" monolith? Is a modular monolith "just a monolith except we don't suck at coding"?

closeparen

3 hours ago

Let's use MVC for the sake of argument. A regular monolith has lots of models, lots of controllers, and lots of views. A modular monolith has several collections of models/controllers/views, which might be tightly coupled internally, but the collections as a whole exposes much smaller APIs to each other. You cannot just reach into an implementation detail of distantly related functionality, even if this functionality is "public" in the programming language package visibility sense (i.e. users repository is visible to users controller).

This is basically what's accomplished by publishing a Thrift/Proto/OpenAPI IDL from a collection of packages comprising a network service. The key insight is that the serialization and networking parts of this are superfluous, what you actually wanted was the visibility rules.

noworriesnate

3 hours ago

A modular monolith has a single executable which runs in different modes, typically depending on environment variables. So you can run three processes in the mode that handles web requests, five processes in the mode that processes events on a queue (e.g. Kafka), etc. Eight processes, running in two different modes, but it's all the same executable. That's the basic idea of a modular monolith.

By "plain monolith" I meant just any kind of monolith.

loloquwowndueo

5 hours ago

A distributed monolith! Worst of both worlds! I’m just kidding of course.

karmajunkie

4 hours ago

yes, it’s called SOA and it’s been around for decades at this point.

arunix

4 hours ago

Is this correct? Practically every job advert I've seen claims they are using microservices (and want candidates with such experience).

Alupis

4 hours ago

It is not correct. This is the sentiment people who don't understand k8s often have, because of handwavy complexity blah blah blah. The predictable quote is always along the lines of "unless you're Google scale..." - which misses perhaps 80% of what microservices bring to the table.

Then they go off and build complicated monorepos that take 6 months to learn before you can effectively contribute.

All paradigms have trade offs. Engineering is about understanding those trade offs and using them where appropriate. Unfortunately too many people just jump on the "k8s is complicated" bandwagon (because it challenges most of the assumptions they've previously held in software development) and entirely write-off microservices without taking the time to learn what problems microservices solve.

sosodev

4 hours ago

You're generalizing way too much. There are still tons of teams out there running and creating new microservices.

hello_moto

5 hours ago

> people just went back by being productive building modular "monolithic" architectures, and using "microservices" only when absolutely necessary.

The number of hi-tech companies that are in the middle-to-large scale have increased significantly from the first wave of Rails era.

Majority of hi-tech companies with listed stock have complexity more than "monolithic" architecture.

Sadly, if a company doesn't grow, they will get eaten by their competitors.

int_19h

5 hours ago

> Majority of hi-tech companies with listed stock

Isn't that kinda circular? Generally speaking, companies only list their stock when they grow large. The vast majority of web dev is not happening in those kinds of companies.

hello_moto

5 hours ago

There are publicly listed hi-tech companies that may not be that big...

ninininino

3 hours ago

We stopped making microscopic microservices but we still ship services. Services are deployable independently from each other, can be scaled independently from each other. A monolith that results in a single build artifact / executable or whose contents must all run in a single pod or application server is inherently harder for larger teams to work on. Deploying a small change means re-deploying your entire application. Scaling your authz system means scaling up your analytics data producers. Separating your code into services that run and deploy independently from each other means organizations can scale without creating headaches for developers.

ch4s3

3 hours ago

> while the trend has been to encourage avoiding monolithic architectures like Rails

I'm of the opinion that this was always bad advice for most people most of the time. Achieving any real infrastructure cost savings this was is difficult, its easy for delivery speeds to suffer, and the debugging experience is terrible.

sergiotapia

2 hours ago

microservices, like graphql, have certainly fallen from grace by more senior engineers. i see mostly jrs advocate for it because that's what they were taught.

a senior engineer will try to keep the monolith for only as possible and only then explore a new tiny service.

Alupis

2 hours ago

To the contrary, it is often the "senior" engineers that refuse to learn new architectures, and only want to build in ways they already know and used in the past.

wkirby

4 hours ago

I still think, pound for pound, it’s hard to beat the productivity and stability of rails as a framework for new web projects. Welcome changes here, but most notably, this new major version update doesn’t appear to have any real breaking changes with the apps we’ve been running in production for years.

HatchedLake721

5 hours ago

I sometimes wish I had picked up Ruby/RoR instead of Node.js ~10-15 years ago.

FigurativeVoid

5 hours ago

It's never too late! The Rails community is very welcoming.

ecshafer

4 hours ago

I missed the big Ruby on Rails fad because I was busy doing scientific computing at the time. But I picked up Rails 3 years ago for a job, and its fantastic. I do wish I picked it up 15 years ago though, I would rather use Rails than Spring, akka, node, or any of the other frameworks ive been using.

blakedzc

2 hours ago

I recently went with Laravel, but I really wish I found Django, Laravel, or Rails instead of Angular and React when I was getting started. I'm not a professional dev, but the code I have done at work is all Node. Really happy to see that Rails 8 shipped with an option for auth as well, when I did the Rails demo when evaluating it I was a bit shocked to find there wasn't a first-party solution for auth.

wry_discontent

5 hours ago

I had a Rails job and slipped back into node, and it's so sad. Node is in a sad state compared to Rails. They don't even know what a framework looks like.

tebbers

5 hours ago

It's the terrible standard library of JS that keeps me with Ruby. Rails makes it even better. Being able to write little things like 3.days.from_now to get a timestamp is great.

throwaway918299

4 hours ago

If you do node professionally, you should be able to pick up Ruby on Rails in a weekend.

saltcod

5 hours ago

Curious if anyone is out there doing both effectively.

Node at work, Rails on the side. Something like that. Feels like a lot to master, but not sure.

Lukas_Skywalker

3 hours ago

I use Node at one of my employers, and Rails at the other.

It is much easier to switch between them than I first expected. I can quite easily use the idiomatic patterns in either framework. But there are obviously very large differences in the two stacks. The most important that come to mind:

- Rails is much more "batteries included". No need to decide what ORM, queue, mailer, remote storage, etc you want to use for the new project. You just use the built in solution. And you place the files in a pre-defined location. That makes it really easy to onboard new people, because they are familiar with the file structure. On the other hand, for Node projects, you can mix and match your components, and use simpler structures for side projects, and more complex structures (including tools like Nx) for more complicated projects.

- The Rails ORM is much more powerful than the Node counterparts. I think it helps, that the ORM is built into Rails, so everyone contributes to the same product. For Node, it feels as if there are many ORMs that are 70% done, but don't cover important cases. One of them is fast but a bit buggy, one is slow but has the ability to deal with schema migrations, one is old and works well but does not support TypeScript.

- Documentation of Node frameworks, for example NestJS, seems to be updated quicker than the Rails counterparts. For Rails, especially when Turbo was released, there was a kind of vacuum regarding the documentation. The docs for Turbo did explain the basics, but it was very very difficult to get it working with the official docs. Once blog posts started to pop up, it became much easier. Projects like Nest seem to have much more detailed documentation for their components.

All in all, I do prefer Rails tbh. The DRY principle that the framework follows makes sure that you don't have to edit 8 files when adding a new database column. This makes development much faster and in my opinion less error prone.

moritonal

5 hours ago

Playing with a WebDev project in Node.js but jobs with Rails.

Node makes things like OAuth trivial with the mix of Express and Passport, something that took me two weeks in Rails. But man does Rails make Sequelize look childish by comparison.

FanaHOVA

4 hours ago

What's wrong with devise OAuth? Always found it super easy.

stouset

5 hours ago

No reason you can’t start now!

megaman821

5 hours ago

I don't use Rails, but those Solid Adapters look cool. I think people would be surprised how long a RDBMS good enough before moving to more specialized solutions. Just jumping to best of class solutions for cache, pub/sub, full-text search, vector search, document storage, etc. adds too much operational complexity if you can get by just using a single database.

mikey_p

2 hours ago

Years ago I was working on a large Drupal site hosted on AWS with RDS MySQL and ElastiCache for caching. We noticed that ElastiCache was slower than we expected and switched the caching backend over to use the MySQL implementation in a simple KV table, and it was quite a bit faster than ElastiCache for most operations.

People really underestimate how good modern RDBMS are, especially when they have their query cache tuned properly, there's no reason to be slower than Memcache or Redis.

ksec

4 hours ago

All the Solid Adapters but they couldn't name one as Solid Snake. Huge waste of opportunity. Hopefully more to come in 8.1

sarlalian

3 hours ago

Solid Snake really should end up in the python world.

0xblinq

3 hours ago

Or an adult movie

dewey

4 hours ago

I'm mainly a Go developer but I've picked up Rails when version 7 came out for all my hobby projects and it's just _fun_ to work with. I don't have to work with complicated frontend tooling and I just push to Dokku to deploy.

elfelf12

10 minutes ago

What do you use for frontend tooling then? Somehow you have to compile scss and do some mild js bundling or so?

geoka9

3 hours ago

As a backend Go developer who had used Rails a lot many years ago, I recently had to do a full-stack project where I got to pick my own stack. I liked the idea of HTMX and also added a-h/templ into the mix. I feel like this setup allows me to be almost as productive as with Rails when doing things that Rails is good at, while enjoying the control and simplicity of the Go approach.

Sphax

an hour ago

templ is great, it's been my go to when working on web stuff with Go.

justinko

4 hours ago

20 year Rails veteran here looking for a full-time position. My GitHub handle is the same.

faizshah

6 hours ago

I highly recommend you watch the first half hour of DHH Rails World talk on Rails 8 even if you aren’t a Ruby dev: https://youtu.be/-cEn_83zRFw?si=ANVPRory_J0LKjZj

The idea of Rails 8 is to move away from trend following and try to reject some of the ideas that have become popular in the industry (like being afraid to touch a Linux server or implementing your own auth). Really though provoking stuff.

rubyfan

6 hours ago

Popular ideas are exactly the problem in the industry. I’ve been really put off by what I believe is a lack of critical and original thinking in tech. Bad leadership within management, cult and fad following seems to abound.

mattgreenrocks

5 hours ago

There’s a real feeling of the blind leading the blind in webdev.

htmx, Rails, and Laravel all point to better ways, and people are starting to be receptive.

galoisscobi

6 hours ago

I second this. I’m not a ruby dev and I watched the whole talk. It was excellent.

Goes on to show how for many applications overly priced platforms as a service aren’t really needed but incidental complexity masquerading as essential complexity is peddled as a way to make money.

xutopia

6 hours ago

This is part of the reason why I love the Rails community so much. It isn't afraid to break down the consensus and find its own path forward. Often with huge benefits.

MangoCoffee

5 hours ago

>try to reject some of the ideas that have become popular in the industry

just my two cents, the web development has become akin to the fashion industry.

We've seen a steady stream of frameworks emerge, from traditional PHP and JavaScript to JavaScript-based development like ReactJS, AngularJS, and now WebAssembly while tried-and-true methods still work.

all the new frameworks bring benefits – but also introduce problems a few years later. The trends drive the IT industry, fueling a cycle of book sales, training camps, and consulting services that corporations buy into every few years.

wiseowise

2 hours ago

> JavaScript-based development like ReactJS, AngularJS

React is 11 years old, AngularJS is 14 years ago, let it go already, gramps.

IWeldMelons

5 hours ago

cant wait when we'll start making webdev in C CGI and finally in Verilog.

hello_moto

6 hours ago

It's DHH marketing style (it sez right there in his earlier book: pick a fight).

Back when Rails burst into the scene, he picked the EJB mountain to battle and positioned Rails vs EJB for as long as he could.

This is another battle in the Infrastructure world that he picked.

The timing was perfect too: Rails grew during economy crisis 2006-2009 (layoff, EJB complexity, web-app complexity, the rise of single-developer entrepreneur). Right now we're sort of in similar situation too: layoffs, infrastructure complexity, BigTech culture, FAANG-leetcode grind.

Tech is like a cycle :)

gadders

5 hours ago

>>It's DHH marketing style (it sez right there in his earlier book: pick a fight).

I think rappers invented starting a beef to shift records.

Thaxll

5 hours ago

His compagny seems to like re-inventing the wheel with vastly inferior solutions though.

pier25

5 hours ago

I don't know about Rails but Kamal 2 is pretty great.

It's their own E2E solution for deploying and running Docker apps in production. Solves SSL, proxy, zero downtime deploys, etc.

https://kamal-deploy.org/

jack_riminton

5 hours ago

Example?

mplewis

4 hours ago

Kamal, Thruster, removing TypeScript from Rails without notice, moving into Webpack and back out again without a reasonable upgrade path, pushing Hotwire over real frontends.

swombat

4 hours ago

I've been working with RoR since back in 2008 (Rails 2.1 yay!).

I'm still working with RoR.

It's still an incredibly quick, powerful, flexible, versatile framework. I'm able to build pretty large and complex apps all by myself, quite quickly, without fuss.

I'm looking forward to the deployment improvements since that was one of the shortcomings that was still around. Kamal v1 didn't really do it for me (currently using Dokku instead). Maybe Kamal 2 is it.

cdiamand

6 hours ago

Anybody have any opinions on moving away from Redis for cables/caching/jobs?

I supposed it'd be nice to have one less thing to manage, but I'm wondering if there are any obvious gotchas to moving these features over to sqlite and postgresql.

xutopia

5 hours ago

For caching specifically solid_cache works better for long lived and larger caches than does Redis. If you need short lived and smaller caches Redis will be more performant for you.

That said you can probably get away with caching way more with solid_cache and it's highly dependent on what your use cases are.

Also a thing to note that your DB backing solid_cache might also be using RAM efficiently, giving you a lot of benefits that Redis did.

For new projects I'll be using solid_cache first and adding Redis only on an as-need basis. The cost of Redis is orders of magnitude higher than a DB backed cache.

cdiamand

5 hours ago

Thanks for this. I've run into "giant cache" issues in the past in this exact use case. I'll give solid_cache a look.

ksec

4 hours ago

DHH mentioned 10TB of cache and only 0.5ms increase in latency difference between Redis and SQLite. I wish other could test it out and have some other figures to point to. But if the stated case were true then I think sacrifice 0.5ms for 10 to 20x more cached resources sounds like a very good deal to me.

lordofmoria

5 hours ago

I had a bad experience with Action Cable + Redis (extremely high memory overhead, tons of dead redis connections), so it's a bit "fool me once" with regard to action cables.

The main argument for caching in the DB (the slight increase in latency going from in-memory->DB-in-memroy is more than countered by the DB's cheapness of cache space allowing you to have tons more cache) is one of those brilliant ideas that I would like to try at some point.

Solid job - i just am 100% happy with Sidekiq at this point, I don't understand why I'd switch and introduce potential instability/issues.

et-al

5 hours ago

What are you using in lieu of Action Cable for websocket connections?

olcarl

3 hours ago

I have used both with rails. (Cable is still going through Redis tho).

Solid cache is perfect for my use case since page caches doesn't change as often, so taking a smaller memory footprint on the server farm is a win.

My take is to measure your cache hit percentage. This will allow anyone to understand their cache eviction rates. If you have high eviction rates maybe using a btree is not the way to go and redis is probably better

JamesSwift

4 hours ago

I havent used them, and we are not moving to them on our existing app but I can super-appreciate the fact that by default redis is more of a down-the-road decision now. No reason to get into the complexity (+ additional hosting cost) of adding another service into the mix until you choose to later on.

nomilk

6 hours ago

I'm sticking with redis purely because it's battle tested and I'm not endowed with enough talent nor time to work through kinks in Solid.

azuanrb

5 hours ago

On Rails homepage, it says from “Hello World” to IPO. The idea is that Rails should help you maintain a lean stack by default. You can stick with Postgres for pretty much everything: caching, background jobs, search, WebSockets, you name it.

But, as your app grows, you can swap things out. Redis or Elasticsearch are solid choices if you need them. DHH mentioned that as well, at scale, everyone does things differently anyway. But you do have the option to keep it simple, by default.

For me personally, Rails 8 is great. My new project only need Postgres and that's it. I don't need Redis, multiple gems for background jobs or cache anymore. Able to avoid the chaotic JS ecosystem for frontend. Hopefully it will be easy to setup Hotwire Native too. It really streamlined things, and letting me focus on building features instead.

That said, for my production apps in existing companies, I’m sticking with what’s already working: Sidekiq, Redis, Elasticsearch. If it ain’t broke, why fix it? Will probably revisit this decision again in the future. Too early to tell for now.

nicoburns

4 hours ago

I've had good experiences using postgres for background jobs.

noobermin

6 hours ago

People just don't talk about Ruby anymore. For those who don't do webdev, has it just stabilised and people take it for granted now, or was it always hype and people have long since moved on?

rogerrogerr

5 hours ago

I've worked on many Rails apps that are still out there in critical spots. My gut feel is it has stabilized. The hype was well-founded; it allows dev velocity that I still haven't seen in any other environment.

I once worked on the integration of an existing Rails app into an existing C# webapp (both living side-by-side, kind of a split-application thing, but seamless to the end user). It was almost hilarious how many LOC the C# teams (!) were having to write for every LOC I (alone) was writing in Rails. Looking through their diffs, it seemed like they were reinventing fire compared to me writing `render :success if SomeModel.update(model_params)`.

neonsunset

5 hours ago

It speaks more about the unfortunate state of practice in the team in question. C# itself is of similar terseness when compared to Ruby, with 10x to 20x better performance so even when written in a bulkier way, it becomes less relevant as you are not going to hold, say, C or C++ against similar criticism in such context. Oh, also no method not found thing too. C# has much greater likelihood of not having defects when you do deploy it.

frostymarvelous

4 hours ago

I'd say this speaks more to the metaprogramming capabilities of rails rather than the team itself.

Rails simply does more for you out the box with just a few macros.

neonsunset

3 hours ago

Do you have a specific example in mind?

pantulis

2 hours ago

I think what parent said is referring to stuff like

https://github.com/mbleigh/acts-as-taggable-on

It's not only that RoR comes with a complete toolset -- it allows you to create your own libraries that extend the capabilities of the framework while keeping the developer experience terse enough through metaprogramming (compare the sample code in the README with the file acts-as-taggable-on/lib/acts-as-taggable-on/taggable.rb, where you can see how the library is opening the classes in runtime through the class_eval technique.

I'm sure something similar can be achieved in C# but not so sure about the elegance of the result.

wiseowise

2 hours ago

> C# itself is of similar terseness when compared to Ruby, with 10x to 20x better performance so even when written in a bulkier way

More like 50-100x.

neonsunset

7 minutes ago

It is true and you have to lack technical knowledge to downvote this.

In regular "line of business" code this difference might be a bit difficult to see in between the calls waiting for DB and third-party dependencies, so I went with more conservative numbers. On the more complex code this difference will be totally observable.

mostlysimilar

5 hours ago

Both Ruby and Rails have continued to improve year over year and are better today than they have ever been.

_joel

5 hours ago

Still a bunch of stuff that runs on ruby that isn't webdev, https://github.com/theforeman/foreman is a big one I can think of. Ruby's quite nice for sysadmin tasks, puppet, chef etc all in ruby iirc.

cout

3 hours ago

I've built a lot of niche applications in Ruby, but a few years ago I switched most of my toy programs to python, because it's easier to find other devs who can meaningfully contribute if I write in python.

At work I have been using Ruby for longer than rails has existed. In those days there were lots of neat uses for Ruby (one of the most interesting being at NASA), but none of us knew if it would ever catch on. We didn't care -- Ruby made programming _fun_, and we were happy to use it even if no one else ever did.

It was partly the language that made Ruby fun but also the community. And it's out of this community that projects like chef, puppet, shoes, etc. were born. Matz has called Ruby human- oriented programming, and I can think of like that is human- oriented than community.

JamesSwift

4 hours ago

Metasploit and homebrew also come to mind

EDIT: also cocoapods

brink

5 hours ago

Rails usage is certainly dropping off a bit. The competition is improving.

I personally got tired of the monkey patching, ActiveRecord's proclivity towards n+1 queries, and complete lack of types / static analysis, among other things. Having to keep a mental model of the types of the entire project, and having to write tests around types takes up a significant amount of my headspace, energy, and time. The older a project gets, the more of a headache these things become. There is an element of "just write better code" to avoid these pitfalls, and that works to an extent, but the older I get the more I realize that the tooling does play a large role in the outcome.

int_19h

5 hours ago

I'm firmly in the static typing camp myself, but at the same time I think it's good that there's still a language that is unabashedly dynamically typed. Looking at Python, when you take a language that was originally designed around dynamic typing and then bolt static typing on top, the result is just awkward all around, and ends up being the worst of both worlds.

berkes

4 hours ago

> "just write better code" to avoid these pitfalls

A lot of issues in and with Rails code leans heavily on this idea. It often comes in other flavors like "You can write rails apps that perform really well" or "Its perfectly doable to write a clean easy maintainable codebase in rails".

And is apparent in the "Provide sharp knives" doctrine as "And by capable, I mean knowledgeable enough to know when and how, accordingly to their context, they should use the different and sometimes dangerous tools in the drawers."

I really dislike this approach. I don't want something that is full of foot-guns and therefore requires me to recognise them when I lack all information to do so.

I've written terrible Rails apps, exactly because it allowed me to so, and I didn't know they would become terrible, until they were. I now recognise the (design) patterns that are foot-guns, I now know the tell-tales that show me where the sharp knives are dangerously placed. But then I get dropped into a Rails codebase that has seen 20+ developers coming and going over a decade, as the 21st developer, and I see it filled with these footguns and dangerously wielded "sharp knives". Often there's a lot of history apparent from these previous devs who saw this too and fixed some of it. But the overall state is still abysmal.

Sure, it's all these devs that made it abysmal. But the ecosystem, the framework and the language allowed, and sometimes even encouraged them to make it that.

Mystery-Machine

4 hours ago

The N+1 queries issue has been addressed in the latest ActiveRecord versions. If there's an N+1, you can set ActiveRecord to raise an error instead of making the N+1 query. Bullet gem, for years now, has also been able to catch the N+1 queries and let you choose how you want to act upon that.

It's true that monkey patching is a problem. I hear you. It's more and more problem of the past though. People realized it's too sharp of a knife and stopped doing that.

hello_moto

5 hours ago

People never fully adopted Ruby for Ruby sake.

People adopted Ruby because of Rails.

Another more adopted Ruby software are probably fluentD and maybe Jekyll. The rest kind of comes and goes.

Majority sys-admin toolings have always been dominated by Python and with k8s hype, some of the toolings have been geared towards k8s automation written in Golang.

In general, sys-admin toolings are a mixed bunch: perl, shell, python, ruby

lordofmoria

5 hours ago

Rails went through a down period 2014-2020 due to several reasons:

1. React burst on the scene in 2014

2. the hyperscale FANG companies were dominating the architecture meta with microservices, tooling etc, which worked for them at 500+ engineers, but made no sense for smaller companies.

3. there was a growing perception that "Rails doesn't scale" as selection bias kicked in - companies that successfully used rails to grow their companies, then were big enough to justify migrating off to microservices, or whatever.

4. Basecamp got caught up in the DEI battles and got a ton of bad press at the height of it.

5. Ruby was legitimately seen as slow.

The big companies that stuck with Rails (GH, Shopify, Gitlab, etc, etc) did a ton of work to fix Ruby perf, and it shows. Shopify in particular deserves an enormous amount of credit for keeping Ruby and Rails going. Their continued existence proves that Rails does, in fact, scale.

Also the meta - tech-architecture and otherwise - seems to be turning back to DHH's favor, make of that what you will.

hocuspocus

5 hours ago

The RoR hype started to wane long before React. You're really missing a huge part of our industry:

- While most 2nd or 3rd tier tech companies don't need Google scale infrastructure, SOA in Java/C# and then Go is incredibly prevalent. Many teams never had a reason to even look at RoR and its considerably worse language and runtime.

- Good ideas from RoR were copied by pretty much every ecosystem; again, most people never wanted Ruby in the first place.

- Plenty of small web shops simply stuck to PHP.

rgbrgb

5 hours ago

you might mean shopify, not spotify. I think spotify is python/go, whereas shopify was started by a rails core contributor and probably has the biggest rails deployment in the world

dropofwill

5 hours ago

Spotify is mostly Java, with some Scala and Node.

hello_moto

5 hours ago

>which worked for them at 500+ engineers, but made no sense for smaller companies

The number of hi-tech companies that grew from 37signals size to Uber size have also increased due to various reasons: SaaS becoming more and more accepted, WallStreet loves SaaS, and in general just more investment money in the market.

dyingkneepad

4 hours ago

Speaking from my own experience at work, for non-webdev, if the project is something I'll want to share with other people, there is a great incentive in just using Python. I can't seem to get people to be interested at all in my tools if they're in Ruby. When I write stuff in Python, people naturally read, use and contribute.

jonathaneunice

5 hours ago

It's stable and mature.

Maybe you don't hear the constant clickity-clack of endless change as a result. Also true that Ruby's most popular in writing web apps and services, where it and Rails continue to shine.

webdev FWIW is a ginormous part of this little internet thing. You know, those Web-based applications and services that run the entire global economy and human society, such as it is.

cout

4 hours ago

How would you define "hype"?

software_writer

6 hours ago

For a concise overview of all the new frameworks and announcements, I recommend reading the official Rails blog post from DHH:

https://rubyonrails.org/2024/9/27/rails-8-beta1-no-paas-requ...

joshmlewis

5 hours ago

Agreed, this should be the main link instead of giving AppSignal free publicity. The original is very much a light reworking of the original. It has the same content order and everything.

rgbrgb

5 hours ago

yeah, OP feels like a gpt rewrite of this post by DHH

itake

3 hours ago

Lots of great features for new rails apps, but what about the app was has been upgraded since rails 4?

Are people actually going to spend time to replace redis or devise?

I wish they’d add new features instead of trying to get people off successful 3rd party gems.

hamandcheese

5 hours ago

I'm curious what the state of Sorbet + Rails is these days. I've been out of the ruby game for a little while now.

Last I recall: sorbet itself is quite good once it is well established in a project, but adding type checking to a project (especially a Rails project) is a lot of work.

yoran

5 hours ago

We use it extensively in our codebase. We started without any types, and added Sorbet later. It's similar to Typescript as that you can gradually sparkle your code with types, building up the typing coverage over time.

I just completed a big refactoring. We have a good suite of tests. But Sorbet has provided an added layer of confidence. Especially when it comes to the treatment of null values. Sorbet will raise an error if you try to call a method on an object that may be null. So it forces you to think through: what should happen if the object is null?

So the tests combined with Sorbet typechecking made that we could just almost blindly deploy refactoring after refactoring, with only a handful of bugs for several 1000s of lines of code changed.

gejose

3 hours ago

We use sorbet pretty extensively. Overall it's been a net positive, but if you're coming from something like typescript, IMO it's far, far behind in terms of usability.

You can get pretty good value from things like intellisense in your editor, knowing that the constant you're referencing or method you're calling exists etc, but most libraries have no typings in sorbet-typed (beyond `T.untyped`).

The last post on Sorbet's blog was from 2022 https://sorbet.org/blog/, so I'm not sure how actively it's being developed. (compare that to typescript where you have a post every month https://devblogs.microsoft.com/typescript/)

riffraff

3 hours ago

AFAIU sorbet is still being developed actively enough at Stripe, but I think there's also ongoing work at Shopify to integrate the Prism parser APIs which will be available in Ruby 3.4 this December

https://github.com/sorbet/sorbet/network

jack_riminton

5 hours ago

Considering how anti-types dhh is, there is not going to be any official support for this anytime soon.

In his most recent interviews the philosophy can be summarised as "if you love types, good for you, but rails isn't for you"

block_dagger

5 hours ago

This is pretty close to Matz’s stance as well.

mahatofu

3 hours ago

Personally, the argument for strong types is when you’re writing critical foreseeably permanent architecture. It’s an extra layer of security and explanation.

sprkwd

5 hours ago

It’s heartening to see Ruby and the Rails community go from strength to strength. When I was a developer I loved the Ruby language.

resters

4 hours ago

Some really great ideas came out of Rails 1 and 2. After that Rails became more of a business, but good ideas still came out of the ecosystem and germinated (in my view more successfully) in the fertile soil of node / js, as well as sinatra -> flask / express, etc.

But Rails' core value prop (doing a lot with strongly opinionated structure) is still useful to a lot of people.

My complaint was always that version upgrades in rails were too costly -- teams would spend months -- and it wasn't usually clear whether upgrading was worthwhile. Also the business aspect led to a lot of ephemeral (very hot and then soon unmaintained) patterns/libraries.

Rails 8 makes me want to look again and see how the system overall has matured.

nomilk

4 hours ago

> led to a lot of ephemeral (very hot and then soon unmaintained) patterns/libraries

For hard core web enthusiasts it makes sense to keep toward the cutting edge, but for boring old sites you just want have them run well and not have to worry about swapping out x for y every few months.

I look forward to swapping out sprockets but I know there'll be teething issues. Same for built in authentication, so I won't be swapping out devise any time soon, probably ever. Same with redis for solid (won't be changing any time soon).

Absolutely love the continued work on rails, but it doesn't mean I'll necessarily those new features, which is totally cool - rails doesn't force you to.

With so much mix-and-match it can get confusing though. When I see a tutorial using importmaps I get confused because I only know esbuild. Now there's propshaft. Similarly with asset pipeline, I sometimes struggle with sprockets, now there's something new to learn and all its interactions with other pieces. (mostly paths and debugging is what I have trouble with, i'm no JS wizard [or ruby wizard for that matter]).

(I just want to spend 95+% of my time making things that solve real problems, not tinkering with and finessing pieces of the framework)

Lukas_Skywalker

14 minutes ago

I have already upgraded to Rails 8 and am currently writing a guide on how to use Propshaft (because I was unable to find important infos). It‘s far from ready, but I plan to include a wizard that allows you to select your needs and it spits out the combination of jsbuild/cssbuild/importmaps/dartsass that you need.

In short: if your application only needs distribution-ready JS and CSS (from libraries like Bootstrap, Splide or Lightbox2) you only need importmaps-rails. If you use SASS, you need dartsass-rails. And if you need to compile TS (with esbuild or webpack) you need jsbundling-rails.

Especially the first case got a lot easier with Propshaft.

xutopia

2 hours ago

Upgrading from 1-4 was difficult but since 4 it has been really easy. Often times nothing much to do from one version to the next.

gejose

4 hours ago

I find that I have a love/hate relationship with Rails. Love the framework, not so much the language, particularly how it doesn't have static typing. Really easy to write, but hard to refactor in my opinion.

I've been looking for a framework as good as rails for typescript, but haven't found anything to that level. The closest I've seen so far have been:

* Adonis https://adonisjs.com * NestJS https://nestjs.com

Is there anything better than these for the node world?

xcskier56

2 hours ago

I've been a rails dev for over a decade... love the framework and the language. About a year ago we started a client project where they had a fractional CTO that wanted to do the API & UI in typescript and so we settled on Nest.JS... tl;dr Nest is about as good of and opinionated of a framework as I've seen in Node land, but it definitely has it's edges:

- ORM: Like another commenter said, the ORM landscape in the node/typescript world is lacking. Every project feels like it's 70% complete and while you can find a project for each feature you want, you can't find one project with all of them. Ended up with TypeORM which has been very meh. - AuthZ: We went with casl which has a very similar feel to cancancan but lacks many of the important features for implementing more complex authz patterns like "you can edit this if you are in the group that owns this item" - Testing: Using Jest but the DSL and setup/teardown is way more complicated than rspec. - Flexibility. Patterns like single table inheritance and polymorphic relationships are poorly supported/fully lacking in typeorm and this bit us. - Learning curve: the DI system in Nest had a long learning curve, and having to sift through half a dozen or more options for each critical package (ORM, AuthN, AuthZ, etc) instead of having 1 or 2 clear choices made getting the project off the ground much much slower than anticipated. This can also just be chalked up to being green to the Node API landscape. - Adding to the learning curve, you have to be much more thoughtful about your code organization and architecture. We have an issue where we've introduced circular coupling through db-level repositories that is very hard to untangle. Rails gives you a great standard to work from that will take you a long ways

All in all it wasn't a terrible experience but the complexity of the domain lead to some challenges that we could have probably solve more elegantly and quickly in Rails. Even after a year of working the in project, I'd say my velocity for medium/simple tasks is still only 80% of what it is in Rails. Definitely lower when more complicated features are involved

square_usual

5 hours ago

What's the difference between the new `script` directory/generator and using rake? I thought rake was meant for basically those things?

Also, is there a good reason to use thruster instead of caddy?

bibstha

3 hours ago

This will answer your question: https://github.com/rails/rails/pull/52335#issuecomment-22395...

> I think there can be some overlap between rake tasks and one-off scripts and opinions may vary. In the related discussion Okura Masafumi mentions that rake tasks are one way but they can be executed multiple times, and I tend to agree, leaving rake tasks for code that is intended to be run multiple times.

> So script/ can hold one-off scripts, for example Basecamp uses script/migrate which I am guessing they use for updating data, and we had a similar folder at my previous company.

> But script/ is not only for one-off scripts, it can hold more general scripts too, for example rails generate benchmark already generates benchmarks in script/benchmarks, and at my previous company we had script/ops which had a bunch of shell scripts and ruby scripts for various ops-related things.

So really not so clear description. It caters to those who feel like they have a script that doesn't really fit in the Rake file.

mplewis

4 hours ago

I really don't understand the NIH that the Rails team is bringing in with Kamal and Thruster. Not everything that HEY uses has to be pushed onto folks at other companies.

Mystery-Machine

3 hours ago

Nothing is pushed. You can upgrade your Rails 7 application to Rails 8 today and no Solid* nor Kamal nor Thruster will be used in your app. It's there for you to use it. If you don't want to use it, don't. They released these new tools and, if you want to use something else, you can. That's the whole idea of Rails.

solanav

6 hours ago

Is it me or is the introduction written in a very chatgpt-esque style?

Terretta

5 hours ago

It didn't invent this corp-chipper style. It just read all of it.

uhtred

4 hours ago

Hoping for a renaissance of frameworks like rails and django now that we have tools like htmx.

Such a nicer way to build stuff.

trevor-e

4 hours 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?

bibstha

4 hours ago

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.

Mystery-Machine

3 hours ago

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.)

trevor-e

3 hours ago

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.

textread

3 hours ago

Please do tell us the Django horror story

unethical_ban

2 hours ago

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.

stuart_real

4 hours ago

As per GitHub's popularity chart, Ruby was the #5 language in 2014, and #10 in 2022 - https://octoverse.github.com/2022/top-programming-languages

Starting a new commercial project/company in 2024 in Ruby is questionable.

hakunin

4 hours ago

Correction: you mean 2014, not 2024.

Do you think there is no criteria worth considering besides the size of the hiring pool? What if 2 hiring pools are sufficiently big, do you still pick the bigger one every time?

stuart_real

4 hours ago

Thanks. Corrected.

> Do you think there is no criteria worth considering besides the size of the hiring pool? What if 2 hiring pool are sufficiently big, do you still pick the bigger one every time?

It is not just a hiring pool. Look at various third-party SASS tools, they see Ruby as a second-grade language to support.

hakunin

3 hours ago

That's not at all my experience. There's a one-line integration between almost everything under the sun and Rails (business/traffic analytics, performance/profilers, error notifications, logging, object storage integration, I could probably go on). Many other frameworks don't even have the general capability of doing one-line integrations.

pjm331

4 hours ago

one could also argue that making tech decisions based on popularity charts is questionable

stuart_real

4 hours ago

One could argue that making tech decisions while completely ignoring popularity charts is more questionable.

Mystery-Machine

3 hours ago

You're right. Those shouldn't be completely ignored. They probably shouldn't be the only argument to make tech decisions upon. Did you ever build any webapp in Ruby on Rails? You should check it out!

pdntspa

4 hours ago

Rising from #10 to #5 seems to imply that a lot of people are making 'questionable' decisions. As an active senior RoR dev since like 2014ish seeing that makes my heart atwitter :)

stuart_real

4 hours ago

I corrected the mistake. It went from #10 to #5. Only language with such secular decline.

Mystery-Machine

3 hours ago

Pardon my sarcasm: You should work on WordPress. It's the most popular website framework in the world.