DEV Community

Ben Halpern
Ben Halpern

Posted on

The Rails Ecosystem is Healthier than Ever

This is the first post in a new "flare tag" we're trying out: #healthydebate.

This tag is a place to create posts with the expectation of a debate. If you enjoy debating software topics or watching in on others debate, you might like this tag. I also hope it will encourage more disagreements to congregate in places where everyone has opted in with the understanding that this is a debate.

Of course, everyone must remain respectful. The code of conduct is important and always enforced throughout the whole site.

Have fun!

On to my topic: Rails is doing awesome!

The ecosystem around Rails remains incredibly strong, and the organizations involved will push the tech forward.

This announcement got me particularly excited:

GitHub being on the bleeding edge of Rails is HUGE. Shopify has been leading the way of late, and I feel like this new involvement will push things even further ahead. Rails has done a great job of staying conceptually aligned and avoiding feature creep and complexity creep.

Whether or not you like the Rails API, the ecosystem remains strong.

Ruby is a weird choice for sprawling web frameworks, it sure seems like a toy scripting language, but things have just worked with Rails. The humans involved have pushed things forward.

Rails remains one of the best choices and is only getting stronger. Feel free to debate me on this!

Others are welcome to take on this debate on my behalf. It's a community debate. I'm not sure how much I actually care to take part in the conversation. We shall see. ๐Ÿ˜‹

Happy coding!

Top comments (44)

Collapse
 
revskill10 profile image
Truong Hoang Dung

What i love the most about Rails/Ruby is the top-notch quality of documentation.
I don't know how good your favorite language is, what i care first is documentation.
Because without good documentation, how good knowledge can be shared and improved ?

Collapse
 
skatkov profile image
Stanislav(Stas) Katkov • Edited

I've been doing Qt in the past and title of top notch documentation (in my personal opinion) is still with Qt.

With Rails you have to read up comments and issues on GitHub.it feels like documentation is a bit behind from actual usage...

Collapse
 
ben profile image
Ben Halpern

I also feel like error messages have been really improving over time.

Collapse
 
revskill10 profile image
Truong Hoang Dung

I said this thing by having little experience with "non-toy languages", what i see is non-existing or very bad quality of documentation. They said: Type is documentation. It's not an excuse for not having a good documentation to welcome and share knowledge among community. It made me sad.

Collapse
 
davefollett profile image
Dave Follett

I've always like Rails a lot but its always been a chore to configure and host it for a production environment with Apache/Other Webserver. Has this part been improved any lately?

Though maybe the answer is DigitalOcean:
digitalocean.com/community/tutoria...

Collapse
 
ben profile image
Ben Halpern

I think it has improved a lot, but I agree that this is still not a strength.

Rails can also be a real pain to get setup in development if anything goes wrong especially outside of the Mac ecosystem.

Collapse
 
davefollett profile image
Dave Follett

What does dev.to use for its production setup? I've used Apache2 with the Passenger Apache module and RVM. I then use Capistrano to deploy new releases of the Rails app.

Works well once I figured out how to get it all working, but has me concerned it will be hard to re-create when I have to update the operating system down the line.

For what it's worth, I've had a positive developer experience with Linux.

Thread Thread
 
rhymes profile image
rhymes

They run on Heroku using puma

Thread Thread
 
ben profile image
Ben Halpern

We run on Heroku using Puma because several years ago I was pulling my hair out trying to get my Rails server working and found Heroku and got everything set up in about ten minutes.

Haven't looked back since. Others in the industry have caught up to Heroku in this regard, so I can't say I'm hooked for life, but I've defaulted to them ever since. So when this was a solo project I just went with what I knew.

Collapse
 
eclecticcoding profile image
Chuck

I agree with Dave.
I use rbenv for Ruby version control on Linux where it has been a joy to learn Ruby/Rails.

Collapse
 
juanmanuelramallo profile image
Juan Manuel Ramallo • Edited

๐Ÿ˜„ A shout-out to ActiveStorage! Rest in peace paperclip, carrierwave and others ๐Ÿ’€

Collapse
 
matteojoliveau profile image
Matteo Joliveau

I love ActiveStorage too, I use it on my personal website and on all new projects at work.
But one major shortcoming I found, and something I hope will be addressed/changed in future versions, is that images cannot be cached by CDNs. I have CloudFront and CloudFlare caching static assets, but I had to exclude images because ActiveStorage generates 5 minutes-lived URLs from the backing service, and after 5 minutes if the cache tries to refresh itself it returns a 404 error.

As you can see in this issue on GitHub, it is a common concern.

Collapse
 
juanmanuelramallo profile image
Juan Manuel Ramallo

Yeah I faced the same issue with no success :(
How did you work around it?
Seems like ActiveStorage was planned for files rather than for images :/

Thread Thread
 
matteojoliveau profile image
Matteo Joliveau

Well... I didn't ahah
We're just avoiding caching images, inefficient but at least it works. I hope they'll fix it soon

Collapse
 
ben profile image
Ben Halpern

dev.to is still on carrierwave ๐Ÿ˜ฑ

Promise we'll get to 5.2 soon!

Collapse
 
shobhitic profile image
Shobhit๐ŸŽˆโœจ

Carrierwave is still much better than ActiveStorage in some circumstance. You don't need two extra queries to get assets of an object, f.e.

Collapse
 
restoreddev profile image
Andrew Davis

Wait, you're not going to break up Dev.to into microservices anytime soon?

Collapse
 
matteojoliveau profile image
Matteo Joliveau

Why would they, I see no real benefits in turning this website into microservices.

It is a rather small-focused platform, with a small team developing it and no real concerns in terms of scalability.

Collapse
 
restoreddev profile image
Andrew Davis

I was being facetious. There is nothing wrong with monolithic apps.

Thread Thread
 
ben profile image
Ben Halpern

We worked with a few consultancies leading up to the open source announcement, mostly for a security audit.

I recall one convo where I was describing the system and I said "it's a Rails monolith", and their immediate automatic response was "so you'll want help breaking it up into microservices".

I was like "What, no! I love our majestic monolith". We do use a handful of external services (ours and SaaS), and none of it makes our process simpler. If anything we want to pull more stuff into the core codebase over time.

There are a lot of valid architectures, and monolith is absolutely one of them.

Thread Thread
 
restoreddev profile image
Andrew Davis

It is amusing to me because a microservice architecture is just a monolith broken up into smaller apps. For a startup, it makes no sense to put the extra planning and context switching onto the team just to have a more trendy setup. As DHH said, embrace the majestic monolith!

Collapse
 
quii profile image
Chris James

Even though I am pretty anti big framework, a part of me wants to live in that kind of ecosystem for the fun of it, loads of people cant be that wrong huh

The last biggish framework I used was a while ago when ASP MVC came out

Do you have any recommended reading material for someone who's been programming a long time but not done a lot of ruby and basically no rails?

Collapse
 
gypsydave5 profile image
David Wickes

Back when I did this sort of thing, it was the Hartl book that was always recommended.

Collapse
 
markthomasm profile image
Mark Thomas Miller

I'm a frontend dev who just started building with Rails. I haven't had this much fun since I learned React.

I love how quickly you can scaffold apps. The community is also very welcoming.

Collapse
 
ben profile image
Ben Halpern

@tux0r I take you for a Rails non-believer.

Collapse
 
tux0r profile image
tux0r

I'm a toy scripting language non-believer.

Collapse
 
ben profile image
Ben Halpern

What about for scripts? Do you have a preferred way to do quick little algorithms?

Thread Thread
 
tux0r profile image
tux0r

I would say Python, but I don't want to read the replies ... :-)

Quick little algorithms are - when I have the choice - usually implemented in C or Lisp, depending on their complexity.

Collapse
 
drews256 profile image
Andrew Stuntz

Is your implication that Ruby is a toy scripting language?

Collapse
 
ben profile image
Ben Halpern

Fairly common here, especially among web companies that sprang up between 2008 and 2015 or so. I think it's definitely fading as a popular starter choice. Node, Go and Elixir definitely took a huge bite out of its popularity.

Collapse
 
pancy profile image
Pan Chasinga

I think to embrace Rails one needs to embrace the "manifesto". I was learning Ruby and Rails a few years back and decided to give up just because it was too magical and its convention was very "dictatorial" to me. I went straight back to Python.

As I've grown more as a developer and had a few more languages in my toolbelt, coming back to Ruby and Rails wasn't so bad. Things started to make more sense and fall into places. (Symbols make sense to me now that I've known Clojure. Lack of parentheses aren't a stranger any more now that I've known Ocaml) I think Ruby (and Rails as a derivative) is a great attempt of an expressive language that's not too mind-bending (as in many functional ones) and yet very simple and even human-friendly.

Reading up the Rails Doctrine by DHH is a pretty good way to befriend Rails. Rails is really pleasing if one can start thinking less about perfection and idealism in a tool and more about shipping.

Collapse
 
rhymes profile image
rhymes

Hi @ben , through this DHH tweet

I came across this recent post Upgrading GitHub from Rails 3.2 to 5.2

It might help :-)

Collapse
 
ben profile image
Ben Halpern

Thanks!

Collapse
 
rrampage profile image
Raunak Ramakrishnan • Edited

Here are a few points regarding what makes an ecosystem healthy:

  1. Maturity - Rails is a very old framework (first version almost 10 years old) and as such, is mature. It is possible for a software to be feature-complete and just release bug fixes. The "cons" of maturity are that newer developers will feel that the technology is boring because of wide-spread acceptance in enterprise and smaller shops.

  2. Availability of libraries - It is difficult for a core framework/library to solve every single problem in a particular niche. As such, it needs a plethora of libraries(gems in case of Ruby) which depend on it and solve ancillary user needs. For example, in web development, a framework can provide routing, templates, caching but leave out ORM or DB access or authentication to other libraries. These libraries help a framework stay relevant. Rails has a plethora of gems which solve a wide variety of problems.

  3. Assumptions - A framework or library is created with some core assumptions which are heavily based on problems of that time. Rails solved a very real problem of the time of quick prototyping and easy iterative development. As times change, the pressing problems of developers change as well. An existing framework may have to reinvent itself or risk being replaced by newer technologies which solve the problem better.

  4. Inertia - A framework has to maintain a balancing act in terms of making changes. Breaking changes displease existing users while no changes lead to code smells due to old mistakes never being fixed. Add too many features and the learning curve and discoverability is affected.

Collapse
 
ben profile image
Ben Halpern

Very well-put.

Collapse
 
rhymes profile image
rhymes

I always send them to speedshop.co/blog/ :D

Collapse
 
skatkov profile image
Stanislav(Stas) Katkov

I've been doing Rails for a while, but until Rails 5 it felt like a burden. I always preferred sinatra/roda over Rails. Tried playing around with other frameworks...

But somehow after working more with Rails 5. It became my default option for a framework. Eco-system became mature enough to have good choice in gems, that satisfy my picky standards. I hardly have 'I'll write a simpler version of this gem in couple of days' moments and I feel like I have more time to do meaningful work.

Collapse
 
briankephart profile image
Brian Kephart

I mostly agree, although since I started on Rails 5 my perspective doesn't go back very far.

I'm a little concerned with the pace of adoption of HTTP/2 features. Rails just got early hints for pushing assets, despite discussions about H2 and Rails going back to at least 2014. A quick search reveals zero info about whether the Rack/Rails ecosystem supports header compression. The most popular deployment option, Heroku, doesn't support H2. This concerns a feature that reached all major browsers over three years ago.

Webpack support has been great for modern frontend tooling, though the shiny new Webpack 4 was released months ago and support via the Webpacker gem is still in prerelease.

So yeah, working with Rails is awesome, and constantly getting better. That's why these few exceptions stick out to me, because they represent little pockets of stagnation in an ecosystem that consistently makes my work better and easier. These are pretty luxurious complaints to have, all things considered.

Collapse
 
rhymes profile image
rhymes

The most popular deployment option, Heroku, doesn't support HTTP/2.

A lot of Rails apps are deployed on Heroku, I feel like if they started supporting it there would be more interest by the Rails community to go "HTTP/2 first"

Collapse
 
alediaferia profile image
Alessandro Diaferia

I'm currently working on a company project with Rails 5.2. We're still on much older version of Rails for the majority of the main product so I can clearly appreciate the progress.
In particular I love how they managed to make Rails 5 much more modular and enabling only the things that you really intend to use keeps the resulting application much lighter to run and work on.