In 2019, Stefan Wintermeyer wrote a blog post Rails needs Active Deployment which received some attention in the Rails community. Later on, he appeared as a guest on the Ruby Rogues Podcast #83 explaining his idea.

His main point is that deployment is (too) difficult for Rails applications, particularly for new developers. And opposed to other aspects of the web development process, Rails doesn’t provide you anything to make your life easier.

This drew my interest, and I’ve investigated a little bit what’s the situation for Rails Deployment in 2020. Here’s what I’ve found.

A Little Bit of History

For quite a long time, the Rails team particularly promoted Rails as being easy to deploy. The Rails website showed a Deploy page where it claimed

Deploying Ruby on Rails is easy

and below

Thanks to […], launching is now almost as easy as developing

At the same time, the most popular book about Rails was “Agile Web Development with Rails” by Sam Ruby et al. There, it says

Ruby on Rails is a framework that makes it easier to develop, deploy, and maintain web applications (3rd ed., page 14)

At that time, the standard way to deploy a Rails app was Capistrano + Passenger. Typically, you would deploy your app to a Linux server (physical or VM).

In 2016, the “Deploy” page was removed from the Rails website without any replacement.

In 2017, the Rails 5 edition of “Agile Web Development with Rails” was released. It still contained the chapter about deploying with Capistrano + Passenger, but it was enhanced by a chapter about deploying to Heroku.

In 2019, Capistrano was removed from the default Gemfile. DHH’s commit message said

Capistrano is no longer a dominant force in the deployment strategy for new apps

In 2020, the Rails 6 edition of the book was released. The deployment chapter was removed.

Situation in 2020: Deployment “out of scope”

So checking official Rails documentation right now, there’s almost nothing about deployment, and it looks like this is by intention. Searching Github issues and the Rails forum shows two statements from core developers (both from 2018):

We prefer not to cover such practices in the Rails documentation, because the majority of what you have to say depends on external software, web servers, application servers, their configuration, databases, operating systems, hosting providers, etc.

https://discuss.rubyonrails.org/t/add-guide-to-deploy-rails-applications/73282

I’m in general -1 about covering this kind of content in the Rails docs. While related, I see it as being out of scope.

https://github.com/rails/rails/issues/32568#issuecomment-381319480

While of course you can argue that the whole deployment process is somehow “unrelated” to the core framework documentation, most Rails competitors do provide deployment guidelines:

DHH: “We’ll explore more in this space” (2019)

In January 2019, DHH posted in the official Rails forum

I’m interested in exploring better defaults for deployment going forward. Many of the fundamentals have improved dramatically, whether they be simply Docker, Kubernetes, cloud providers at large, or Heroku. So we’ll explore more in this space, but there’s nothing concrete at the moment.

To my knowledge, nothing has happened so far.

The Docker Book

In recent years, Docker has become one of the industry standards for running web applications. So I was happy that a book about the combination of Rails and Docker was released: “Docker for Rails Developers” by Rob Isenberg (2019). This book is also often recommended in forums when Rails deployment is discussed.

However, while this is a good book about Docker itself, it doesn’t provide you an (easy) guideline how to deploy a Rails app to a Docker environment. Additionally, having to read 200 pages to get a basic deployment workflow is too much, in my opinion. (If you need a more advanced solution with clusters etc., this book might be helpful, though.)

Final Thoughts

In a DevOps environment, developers have to care about deployment, and I guess for a lot of Rails developers this has always been the case. When I started with Rails (in 2010), I was astonished how easy it was to deploy Rails to production, just following a short chapter of “Agile Web Development with Rails”. 10 years later, situation has become worse, not better. Deployment documentation has been removed from official resources, without replacments. You have to rely on external documentation, forums, StackOverflow, or commercial products now.

Appendix: Some Resources

If you came to this post to get an overview about deployment options, here’s a short (very incomplete) list of resources: