---
title: "Using Docker for Rails development"
publication: "Ruby Weekly"
issue: 595
published_at: "2022-03-17"
canonical_url: "https://rubyweekly.com/issues/595"
---

Plus an update on WebAssembly support in Ruby, and some cross community love between Rails and Laravel. |        

#​595 — March 17, 2022 

[Read on the Web](https://rubyweekly.com/issues/595)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/ytgquuhtvwitivihe2ff.jpg)](https://evilmartians.com/chronicles/ruby-on-whales-docker-for-ruby-rails-development)  

[Ruby on Whales: Dockerizing Ruby and Rails Development](https://evilmartians.com/chronicles/ruby-on-whales-docker-for-ruby-rails-development) — There a boatload (ha!) of articles on ‘dockerizing’ Rails apps, but this newly updated one is _very good_ and results in a nice setup, specifically for development rather than production. Plus, they’ve added a template via RailsBytes to get you using it. 

Vladimir Dementyev   

[An Update on WebAssembly/WASI Support in Ruby](https://medium.com/@kateinoigakukun/final-report-webassembly-wasi-support-in-ruby-4aface7d90c9) — The author is both a committer to Ruby _and_ Swift and is working on WebAssembly support in both spheres. This post presents a summary of recent progress made to bring native WebAssembly and WASI support to Ruby – likely to [land](https://bugs.ruby-lang.org/issues/18462) in Ruby 3.2. 

Yuta Saito   [![\](https://copm.s3.amazonaws.com/59aceb71.png)](https://www.cloud66.com/frameworks/rails/?utm_source=-&utm_medium=-&utm_campaign=RubyWeekly-22-q1-2) 

[The Best Deployment Tool for Rails](https://www.cloud66.com/frameworks/rails/?utm_source=-&utm_medium=-&utm_campaign=RubyWeekly-22-q1-2) — Deploy Rails apps on any cloud, with native support for Rails conventions, full databases support, replication & backups, powerful access management & traffic control features. Try it today for free with an extra $100 in free credits with the code:`RubyWeekly!` 

Cloud 66 sponsor   

[The Perils of Parallel Testing in Rails](https://blog.appsignal.com/2022/03/16/the-perils-of-parallel-testing-in-ruby-on-rails.html) — Parallel testing seems like a simple solution to speeding up your tests (run more tests at once == faster, no?) but there are considerations and gotchas, and knowing them can help you get the biggest bang for your parallel buck. 

Hans-Jörg Schnedlitz (AppSignal)   

**IN BRIEF:** 

- Brad Gessler is keen to share [the value of using `bundle add`](https://github.com/rubygems/rubygems/pull/5337) rather than manually adding a gem to your Gemfile, and it looks like this recommendation is going straight [into the boilerplate docs](https://github.com/rubygems/rubygems/pull/5337/files#diff-ccae75397649689e55f6a439c7ca2b3054050c9e90ceb24c739e0449850bbb79) generated by Bundler's `bundle gem` soon.
- 🇺🇦 Ukrainian Rubyist Victor Shepelev remains close to the danger of Russia's invasion of Ukraine and [reminds us of the peril](https://zverok.space/blog/2022-03-15-STILL-WAR.html) both he and his country are in.
- [Rails 5.2.7](https://rubyonrails.org/2022/3/11/Rails-5-2-7-has-been-released) (a very old branch – 5.2 came out in 2018) has been released to restore support for Ruby 2.2 that had been broken. In related 'old version' news, [Rails 6.1.5](https://rubyonrails.org/2022/3/10/Rails-6-1-5-has-been-released) has been released too.     

Jobs  

[Backend Engineer | Remote within CET (-3/+3 hours) | Full-Time](https://jobs.lever.co/qonto/284b8162-5293-4ad7-a9e6-4ad26ce0c516?lever-origin=applied&lever-source%5B%5D=Cooperpress) — Europe's leading business finance solution. You will help us simplify everything from everyday banking and financing, to bookkeeping and spend management. 
Qonto   

[Senior Back End Developer - Ruby/Rails](https://peggy.com/careers?ashby_jid=bcf449d8-38d0-49d7-aca6-8986d5c74539) — Peggy useas AI to transform the art market. Come hack on an elegant Rails API with our world-class and fully remote team. ROR, PG, AWS, K8S, Sidekiq. 
Peggy   

[Join the Remote Work Revolution](https://topt.al/KxcAe8) — We offer the freedom of freelance with the security of full-time. Start working remotely with the world’s top clients today. 
Toptal    

📕 Articles & Tutorials  

▶[Framework Friends: A Podcast Comparing Rails and Laravel](https://www.frameworkfriends.com/) — Laravel is a popular and (very loosely) Rails-esque framework in the PHP space which DHH even [recently](https://twitter.com/dhh/status/1501190869768187909) gave some kudos to. This new podcast features developers from each ecosystem telling their stories and making comparisons. 

Framework Friends podcast    

Talking of Laravel, its creator, Taylor Otwell, [▶️ went on the _Remote Ruby_ podcast](https://share.transistor.fm/s/75177629) too and spoke about Laravel's origin story and how Rails has influenced it over the years.  

[Know What Your Scopes Are Doing: `where.first` vs `find_by`](https://andycroll.com/ruby/where-first-vs-find-by-know-what-your-scopes-are-doing/) — _“Knowing the exact SQL Active Record is generating from methods that might seem the same on the surface can be very important.”_ 

Andy Croll   

[Pipelining Without Pipes](https://thoughtbot.com/blog/pipelining-without-pipes-in-ruby) — A fun jaunt through a problem that benefits from mixing both OOP and functional bits of Ruby together showing how the language makes programmers happy. 

Matheus Richard (thoughtbot)   

[Achieve Stripe-Quality Webhooks for Your App in Minutes 💃](https://www.hookrelay.dev/?utm_source=ruby_weekly) — Hook Relay offers you inbound and outbound webhook management with automated retries, debugging, and delivery history. 

Hook Relay sponsor   

[Finding an Initially Confusing Result in Rails](https://dev.to/kevin_j_m/finding-an-initially-confusing-result-in-rails-112n) — Do you really understand how `find_or_initialize_by` works? 

Kevin Murphy   

[Don’t Run Your Ruby Minitest Classes Twice](https://ignaciochiazzo.medium.com/dont-run-your-ruby-minitest-classes-twice-988645662cdb) — _“If a Minitest class inherits from another class, it will also inherit its methods causing Minitest to run the parent’s tests twice.”_ (There’s a typo in the example, but the point remains.) 

Ignacio Chiazzo   

['The Problem That ViewComponent Solves for Me'](https://www.codewithjason.com/the-problem-that-viewcomponent-solves-for-me/) — There’s been many articles on _how_ to use the [ViewComponent](https://viewcomponent.org/) gem, but not many on _why_. 

Jason Swett   

▶[Discussing Audit Logging in Rails](https://rubyrogues.com/audit-logging-in-rails-538) 
Ruby Rogues podcast  

🛠 Code & Tools  

[hotwire-example-template: A Collection of Hotwire Examples](https://github.com/thoughtbot/hotwire-example-template) — Each branch is a different example including live preview, type-ahead search, dynamic forms, using maps, and more. With all the Hotwire tutorials coming out, this repository is timed perfectly. 

thoughtbot, inc.   

[rrule: iCalendar RRULE Expansion for Ruby](https://github.com/square/ruby-rrule) — RRULE is a specification for calendar/date ‘recurrence rules’ defined as part of the [iCalendar spec](https://datatracker.ietf.org/doc/html/rfc5545). For example, you can have `FREQ=DAILY;COUNT=3` resolve to dates over the next three days. 

Square   

[🐘 The Developer Experience You’ve Always Wanted for Postgres](https://crunchybridge.com/use-case/rails?utm_source=cp-rails&utm_medium=em) 

Crunchy Bridge sponsor   

[Alba 1.6: A Superfast JSON Serializer](https://github.com/okuramasafumi/alba) — Supports JRuby and TruffleRuby as well as CRuby. This release includes deprecations in preparation for a future 2.0 release, but also adds support for [using instance methods as attributes](https://github.com/okuramasafumi/alba#simple-serialization-with-root-key). 

Okura Masafumi   

[PGSync 0.7: Sync Postgres Data Between Databases](https://github.com/ankane/pgsync) — Speed and security are the order of the day, and you can sync partial tables or groups of tables. The README shows off some examples. Written in Ruby. 

Andrew Kane   

[VCR 6.1: Record Your Test Suite's HTTP Interactions and Replay Them](https://github.com/vcr/vcr) — A long standing library for recording HTTP interactions and replaying them during testing. Following 6.0 by two years, 6.1 is principally a release of tweaks and fixes rather than new features. 

VCR   

[telegram-bot-ruby 0.18.0: A Ruby Wrapper for Telegram's Bot API](https://github.com/atipugin/telegram-bot-ruby) — [Telegram](https://telegram.org/) is a popular messaging app (and even more so since Russia’s invasion of Ukraine) that’s particularly friendly to bots. This release adds support for more recent Bot API features. 

Alexander Tipugin   

[Disco: Generate Recommendations Using Collaborative Filtering](https://github.com/ankane/disco) — The idea is simple: supply data that represents reviews or activities from users.. then you can generate recommendations for other users from it. 

Andrew Kane   

[Torch.rb 0.10.0: Deep Learning for Ruby](https://github.com/ankane/torch.rb) — A way to use [Torch](https://pytorch.org/), an open source machine learning framework. 

Andrew Kane      

💡**Tip of the Week** 

   

## `bundle open` 

Sometimes, we'll see a gem throw an unexpected error, or behave in a way that we don't fully understand. In these cases, it can be useful to have more information. I often find it helpful to edit, or at least look at, the gem's code directly. 

`bundle open <gem_name>` allows us to do this. All it requires to work correctly is that we set the `EDITOR` (or `BUNDLER_EDITOR`) environment variable to our preferred editor (for example, "EDITOR=code" or "EDITOR=vim"). Then if we run `bundle open <gem_name>`, it will open up our editor right to the directory of the installed gem itself. We can make any changes as we're debugging to help us figure out what is happening! 

If you want to do something that's a one off and open the `sinatra` gem in VS Code, say, you could also do it in a single liner like so: 

`EDITOR=code bundle open sinatra`    

This week’s tip was written by [Jemma Issroff](https://twitter.com/jemmaissroff) and edited by Peter Cooper.           

Curated by [Peter Cooper](https://twitter.com/peterc), [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
