---
title: "Debugging Hidden Memory Leaks in Ruby"
publication: "Ruby Weekly"
issue: 472
published_at: "2019-10-17"
canonical_url: "https://rubyweekly.com/issues/472"
---

This week's Ruby news.       

#472 — October 17, 2019 

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

Ruby Weekly  

[Debugging Hidden Memory Leaks in Ruby](https://samsaffron.com/archive/2019/10/08/debugging-unmanaged-and-hidden-memory-leaks-in-ruby) — Tracking down a nasty (new with Rails 6) memory leak using tools like mwrap, heaptrack, iseq_collector, and chap. If these tools aren’t in your toolbox, they might be soon! 

Sam Saffron   

[Shrine 3.0 Released: The File Attachment Handler](https://twin.github.io/shrine-3-0-released/) — Shrine is a gem for handling file attachments that supports resumable uploads and can work with Rails and standard Rack apps. This version is even more friendly to non-Active Record frameworks, among other things. 

Janko Marohnić   [![\](https://copm.s3.amazonaws.com/c1f5483c.png)](https://squareup.com/t/f_online/d_newsletter/p_cooperpress/c_nonbrand/l_us/dt_alldevice/pr_developer/?route=blog/announcing-square%27s-new-ruby-sdk&site=developer.squareup.com) 

[A New Ruby SDK Gem for Rubyists to Use the Square API](https://squareup.com/t/f_online/d_newsletter/p_cooperpress/c_nonbrand/l_us/dt_alldevice/pr_developer/?route=blog/announcing-square%27s-new-ruby-sdk&site=developer.squareup.com) — The Square SDK gem makes it easy to use Ruby to process payments or store a card on file from your mobile app or web form. You can also make commerce apps that go beyond payments with orders, customers, inventory and more. 

Square sponsor   

[How MJIT Generates C From Ruby - A Deep Dive](http://engineering.appfolio.com/appfolio-engineering/2019/7/19/how-mjit-generates-c-from-ruby-a-deep-dive) — If you like digging into the guts of Ruby compilation and C code, this is your jam. If not, _“…this may be a good week to skip this blog.”_ 

Noah Gibbs   

[A Detailed Log of the Changes in Ruby 2.4](https://rubyreferences.github.io/rubychanges/2.4.html) — “Ruby 2.4!?” you say, “That came out 3 years ago.” True, but zverok has continued to analyse its changes in-depth (as well as [those in Ruby 2.5](https://rubyreferences.github.io/rubychanges/2.5.html)) which can be a handy page to skim to find those new features you simply missed or never noticed (e.g. I never knew about `Integer#digits` till just now). 

zverok   

[Ruby 2.7 Introduces a `Array#intersection` method](https://blog.saeloun.com/2019/10/14/ruby-adds-array-intersection.html) — Ruby 2.6 added `union` and `difference` methods to `Array` (which broadly work like the `|` and `-` operators), and Ruby 2.7 is going a step further with `intersection` that will work like the `&` operator. 

Aditya Narsapurkar   

[faastRuby: An Indie Ruby Serverless Platform Shuts Down?](https://faastruby.io/) — faastRuby was an interesting, independent serverless platform built at a time when AWS Lambda didn’t support Ruby at all. Reading between the lines, it seems the developer may have been acqui-hired by Shopify but he says he’ll be “taking down all faastRuby servers” as a consequence. 

Paulo Arruda  

💻 Jobs  

[Sr. Rails Engineer - Top Consultancy (Remote First / India)](https://www.bigbinary.com/jobs/software-engineer?utm_source=rubyweekly) — Highly-technical Rails/React/React Native firm led by to of the top 100 Rails contributors. 

BigBinary.com   

[Rails Developer](https://cultivatelabs.com/jobs) — Help build crowdsourcing tools that democratize decision making and fight politics in large organizations. 

CultivateLabs   

[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 specializes in tech roles and is completely free for job seekers. Create a profile to get started. 

Vettery  

📘 Articles & Tutorials  

[Getting Started with AWS S3 IAM Policies Security Config for Rails Apps](https://pawelurbanek.com/s3-iam-config) — The joy of getting S3 bucket access and permissions often leads to incorrect and insecure configurations. Is yours configured properly? 

Paweł Urbanek   

[Let's Hash This Out](http://blog.testdouble.com/posts/2019-10-15-lets-hash-this-out.html) — Some history and advice on using hashes, including why the author prefers `Hash` over `HashWithIndifferentAccess` and you probably should, too. 

Steve Jackson   

[Automate and Standardize Ruby Code Quality](https://lp.codacy.com/ruby-code-review?utm_source=CooperPress&utm_medium=cpm&utm_campaign=CooperPress-RubyS) — Set standards on coverage, duplication, complexity, and style issues and see real-time feedback in your Git workflow. 

Codacy sponsor   

[Exploring Linux File Locking Mechanisms in Ruby](http://lambdapapers.com/2019/10/14/linux-file-locking-ruby.html) — The usage and gotchas of a couple of file locking mechanisms that discusses bits like advisory and partial file locking. 

Prajjwal Singh   

▶[Surviving Webpack with Ross Kaffenberger](https://devchat.tv/ruby-rogues/rr-434-surviving-webpack-with-ross-kaffenberger/) — If the introduction of Webpack into Rails 6 (via [Webpacker](https://prathamesh.tech/2019/08/26/understanding-webpacker-in-rails-6/)) has caused confusion, maybe these tales of making the move will fill you with confidence. 

Ruby Rogues Podcast podcast   

[How to Make Colors With Ruby and Bitwise Operations](https://blog.codenamev.com/a-simple-ruby-guessing-game/) — We don’t see many posts about using Ruby with a Raspberry Pi and this one is particularly fun, nerdy, and colorful. 

Valentino Stoll   

[Rails 6's `delete_by` and `destroy_by` Methods](https://blog.saeloun.com/2019/10/15/rails-6-delete-by-destroy-by.html) 

Saeloun Blog   

[Rails, Webpacker, and Vue CLI Can Actually Play Nicely](https://t.co/rCKU1cFImf) — This is more of a “rip it all out and then put it back a bit differently” approach to the problem, just so you know. 

Andrew Hunter  

🛠 Code and Tools  

[Humanize: A Library to Make Your Numbers More 'Fancy'](https://github.com/radar/humanize) — If by ‘fancy’ you mean turn into natural language versions, e.g. `15.humanize # => "fifteen"` .. it supports English, Spanish, French, and 7 other languages out of the box. 

Ryan Bigg   

[with_advisory_lock: Advisory Locking for ActiveRecord](https://github.com/ClosureTree/with_advisory_lock) — Think of an advisory lock as a mutex that can span multiple hosts. 

ClosureTree   

[eBook: Best Practices for Optimizing Postgres Query Performance](https://pganalyze.com/ebooks/optimizing-postgres-query-performance?utm_source=RubyWeeklySecondary) 

pganalyze sponsor   

[Piperator 1.0: Composable Pipelines for Enumerators](https://github.com/lautis/piperator) — Inspired by both Elixir’s pipe operator and Node.js streams. 

Ville Lautanala   

[Active Merchant: Shopify's Simple Payment Abstraction Library](https://github.com/activemerchant/active_merchant) — A well-established, long-standing gem that continues to get frequent updates. 

Shopify   

[Xcodeproj: Create and Modify Xcode Projects from Ruby](https://github.com/CocoaPods/Xcodeproj) — One for you macOS/iOS developers, this could help you script away boring management tasks or auto generate projects, etc. 

CocoaPods         

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
