Is Rails (Actually) Dead?
Yep, it’s another “Is Rails Dead?” post. These posts have become a meme in certain corners of the web dev community. It’s a version of Eternal September where people (generally newer developers) ask if Rails is still worth learning because they heard X is the new hot thing for developing websites. Seasoned Rails developers respond, “No! Rails isn’t dead! It gives you incredible development velocity!”
I recently decided to build a new app from scratch. It’s a simple CRUD app with user accounts, the type of app where Rails should excel. While I’m generally happy with it, I think it’s safe to say that although Rails may not be dead yet, it’s certainly teetering.
One of the supposed benefits of Rails is its extensive package library. “There’s a gem for virtually everything!” Rails boosters say. And this is true! The problem is that many gems are not maintained. Even some stalwart gems, the ones that are universally agreed upon as the “default” gem for handling a given problem, are not regularly maintained. Rolify, which is regarded as the go-to gem for assigning roles to resources, just issued a new release after 2.5 years! And that’s not because the gem was stable – there were many PRs and issues that were lying stagnant. In some cases, serious issues have been lying unfixed for years .Ironically, the maintainer had left Ruby for other technologies which is one reason why it was unmaintained for so long! Quite ironic.
Paperclip is a popular gem for handling file uploads. It is now deprecated as Rails brought much of the functionality into its core as ActiveStorage
. Note that I said “much of”, not all. Indeed, ActiveStorage
is missing some (in my opinion, crucial) features including validation and custom key specification. But no worries! This is the beauty of open-source software—if something doesn’t exist, someone can add it and everyone can benefit. And much of the code was already present within Paperclip, so we know the lack of these features isn’t technical. The problem is that the ActiveStorage
maintainer doesn’t want these features.
Check out this PR to add validations to ActiveStorage
. It has been virtually complete for over a year. 6 months after the issue was first opened, the maintainer finally shows up to declare that he doesn’t want to merge the PR due to his pre-existing notions on how the gem should be used! Another glaring omission from ActiveStorage
is the inability to provide a prefix to namespace resources, e.g. create a folder tree in S3. In terms of development, this would be an exceedingly trivial feature to build. Check out this helpful comment by the maintainer.. What an absolute doozy. Here’s another beauty from further down the thread. Put simply, ActiveStorage
is incomplete. It should not be included in Rails core, specifically if maintainers are unwilling to listen to the community (who, should be noted, are battle-testing Rails in a variety of circumstances every day and know its deficiencies best) when it comes to making changes.
So, to recap: one of the most popular libraries is deprecated, virtually without warning, because the functionality is included in Rails core. Yet, the team responsible for maintaining this portion of Rails, which is just ONE GUY as far as I can tell, refuses to include many of the features that made Paperclip so popular in the first place. Users are caught in the middle.
To wit, Rails is still respectable. You can build things quickly and easily. There is a wealth of documentation, especially on informal sites like StackOverflow, and a robust userbase. But the idea that you can just “plug and play” is gone. If you really need something to exist, chances are you’re going to have to build it yourself.