---
title: "Using materialized views in Rails"
publication: "Ruby Weekly"
issue: 484
published_at: "2020-01-16"
canonical_url: "https://rubyweekly.com/issues/484"
---

This week's Ruby news.       

#484 — January 16, 2020 

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

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/aortlrwzgdu0bd0qh2uv.jpg)](https://pganalyze.com/blog/materialized-views-ruby-rails)   

[Effectively Using Materialized Views in Rails](https://pganalyze.com/blog/materialized-views-ruby-rails) — Postgres’s views and materialized views provide easy alternative ways of looking at a database’s underlying data through the lens of a persistent query, and working with them in Rails is not too tricky. 

Leigh Halliday   

[A Migration Path to Bundler 2+](https://eregon.me/blog/2020/01/13/a-migration-path-to-bundler2.html) — If you’ve tried using Bundler 2, you probably know about the elevated RubyGems version requirements or other issues. Here’s a path the Bundler team could use (and has, partly.) 

Benoit Daloze   [![\](https://copm.s3.amazonaws.com/f2072d20.png)](https://github.com/workarea-commerce/workarea) 

[Next-Gen Open Source Rails Commerce Platform](https://github.com/workarea-commerce/workarea) — Workarea is an enterprise-grade Ruby on Rails commerce platform supporting merchants doing $150 million+ online and is designed to integrate commerce, content, search, and insights in a single admin. This Rails app uses MongoDB & ElasticSearch. 

Workarea sponsor   

[A Deep Dive Into 'Did You Mean?'](https://shime.sh/deep-dive-into-did-you-mean) — Since version 2.3.0, Ruby comes bundled with `did_you_mean`, a handy gem for detecting typos in your code. How does it work? 

Hrvoje Šimić   

[Writing a Program That's Both Ruby and Python](https://nkanaev.github.io/posts/polyglot/) — Is this useful? I don’t think so. Is this interesting enough to warrant 30 seconds of your time? Sure 😄 

Nazar Kanaev   

[3 Ways Webpack Surprises Web Developers](https://rossta.net/blog/three-ways-webpack-surprises-rails-developers.html) — One for Rails 6 developers. _“When I first started working with Webpack, I was in for a few surprises. I assumed how things should behave, based on my previous experience with the Rails asset pipeline, only to learn through experience how I was wrong.”_ 

Ross Kaffenberger   

[The Ruby Bibliography: Academic Writing on Ruby](http://rubybib.org/) — It’s been a couple of years since we last linked to this list of theses and peer-reviewed papers and articles on or about Ruby, but 2019 saw six additions if you’re seeking some highbrow bedtime reading. 

Chris Seaton et al.  

💻 Jobs  

[Software Engineer, Full-Stack (Ruby/Rails/JS)](https://grnh.se/559cdf231) — Health Tech, join our distributed engineering team in our quest to make doctors more effective using Ruby, Rails, Vue.js. 

Doximity   

[Full-Stack or Front-End Engineer - Rails/React (Remote/NYC)](https://jobs.lever.co/tempest/1847eb07-740b-4da4-916d-92c08686ec53?lever-origin=applied&lever-source%5B%5D=Cooper%20Press%20Ruby%20Weekly) — Got 2+ years of experience? Come help build the next iteration of our growing digital recovery platform centered on providing alcohol abuse treatment. 

TEMPEST   

[Find a Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-rubyweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77583) — Vettery is completely free for job seekers. Make a profile, name your salary, and connect with hiring managers from top employers. 

Vettery  

📘 Articles & Tutorials  

[Testing Signed and Encrypted Cookies in Rails](https://philna.sh/blog/2020/01/15/test-signed-cookies-in-rails/) — _“I’d never tested the value in a signed cookie before and it wasn’t immediately obvious what to do..”_ 

Phil Nash   

[The Pros and Cons of Using `structure.sql` in Your Rails App](https://blog.appsignal.com/2020/01/15/the-pros-and-cons-of-using-structure-sql-in-your-ruby-on-rails-application.html) — Discover the major differences and benefits of using `structure.sql` vs `schema.rb` in your app. 

Daniele Pestilli   

[Track Down Ruby Performance Issues Fast. Get Back to Coding with Scout](https://try.scoutapm.com/ruby_weekly/) — Scout continually tracks down N+1 database queries, sources of memory bloat, performance abnormalities and more. 

ScoutAPM sponsor   

▶[Discussing `rubyfmt` with Penelope Phippen](https://www.greaterthancode.com/rubyfmt) — [rubyfmt](https://github.com/penelopezone/rubyfmt) is a Ruby code formatting tool. [rufo](https://github.com/ruby-formatter/rufo) is another tool in this space worth exploring. 

Greater Than Code Podcast podcast   

▶[Building an Asynchronous Scheduler for Ruby](https://youtu.be/OlmySf03GUo?t=44) — _(Note: The first 45 seconds are silent.)_ 

Samuel Williams   

[Contributing to Ruby MRI](https://kirshatrov.com/2020/01/11/contributing-to-mri/) — Do you have a resolution around contributing to Ruby? If so, start with these brief pointers. 

Kir Shatrov   

[A Sequel Cheatsheet](https://devhints.io/sequel) — Sequel is many folks’ favorite replacement for ActiveRecord. 

Devhints.io  

🛠 Code and Tools  

[Rufo: An Opinionated Ruby Code Formatter](https://github.com/ruby-formatter/rufo) — Intended to be used via the command line as an editor plugin (Atom, Emacs, Sublime Text, Vim or VS Code) to auto-format files on save or on demand. Aims to be zero config and offer ‘one true’ formatting approach. 

Ary Borenszweig   

[Solidus: A Rails-Based E-Commerce System](https://github.com/solidusio/solidus) — It’s been around for some time, but [yesterday’s release](https://github.com/solidusio/solidus/releases/tag/v2.10.0) introduces Rails 6 support. 

Solidus   

[Learn About Automated Postgres EXPLAIN Plan Insights on pganalyze](https://pganalyze.com/blog/automated-postgres-explain-plan-visualization-and-insights?utm_source=RubyWeeklySecondary) 

pganalyze sponsor   

[Grape 1.3: An Opinionated Framework for Creating REST-like APIs](https://github.com/ruby-grape/grape) 

Michael Bleigh   

[Closure Tree: Make Active Record Models Support Tree Hierarchies](https://github.com/ClosureTree/closure_tree) — Boasts that it’s *“dramatically more performant than [ancestry](https://github.com/stefankroes/ancestry) and [acts_as_tree](https://github.com/amerine/acts_as_tree), and even more awesome than [awesome_nested_set](https://github.com/collectiveidea/awesome_nested_set/)”. It’s an old project but has just had its first release in over a year. 

Matthew McEachen   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1579192991/zf42sjc4pq44jl2xrjyt.png)](https://github.com/mame/green-square-quine)  

[A Ruby Quine in GitHub Contribution Squares](https://github.com/mame/green-square-quine) — And to think it only took 38 years of `git` commits to make.. 😏 

Yusuke Endoh   

[rouge: A Pure-Ruby, Pygments-Compatible Code Highlighter](https://github.com/rouge-ruby/rouge) — This week’s [release](https://github.com/rouge-ruby/rouge/releases/tag/v3.15.0) adds support for Objective C++, GHC (Haskell) and FreeFEM. 

rouge-ruby   

[DropletKit: The Official DigitalOcean API Client for Ruby](https://github.com/digitalocean/droplet_kit) 

DigitalOcean         

Curated by [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
