---
title: "This week's Ruby news, issue 331"
publication: "Ruby Weekly"
issue: 331
published_at: "2017-01-12"
canonical_url: "https://rubyweekly.com/issues/331"
---

This week's Ruby news, issue 331

This week's Ruby and Rails news[Read this e-mail on the Web](http://rubyweekly.com/issues/331)

Ruby WeeklyIssue 331 — January 12, 2017

Jonan Scheffler[A Detailed What's New in Ruby 2.4](https://blog.heroku.com/ruby-2-4-features-hashes-integers-rounding)An in-depth dive into what’s new, including a very detailed look at the impressive Hash improvements.


Derek Haynes[State of the 2017 Rails Stack](http://blog.scoutapp.com/articles/2017/01/09/state-of-the-2017-rails-stack)Is Rails 5 gaining ground? What database are Rails developers using? These answers and more in Scout’s annual data analysis.


Parth Modi[Document Your Rails API with Swagger](https://www.sitepoint.com/do-the-right-thing-and-document-your-rails-api-with-swagger/)A walk through the process of creating a simple API with Swagger-based documentation.


ReinteractiveSponsored[FREE Ruby on Rails code reviews by industry experts](https://reinteractive.com/service/free-code-review?sid=106)Peer reviews can be really useful! Contact us for a FREE code review and we'll send you a custom report of our recommendations for improvements.

[![Reinteractive\](https://copm.s3.amazonaws.com/dd6f0304.png)](https://reinteractive.com/service/free-code-review?sid=106)


Stack Overflow[Why Is 'sum' So Much Faster Than inject(:+)?](http://stackoverflow.com/q/41449617/3951)The answer goes into some depth and the way Ruby implements ‘sum’ isn’t quite as I’d expected.


Fred Heath[The Various Many-to-Many Associations with ActiveRecord](https://www.sitepoint.com/master-many-to-many-associations-with-activerecord/)A look at intransitive, mono-transitive and multi-transitive associations.


Iago Moreira[From Rails to Hanami: Models](https://blog.codeminer42.com/from-rails-to-hanami-models-d1175d2d5b33)The first of a series comparing making a Todo list in Rails and [Hanami](http://hanamirb.org/), an alternative modern Ruby Web framework.


Jim Gay[How Jim Fixed His Biggest Mistake with Implementing Background Jobs](https://www.saturnflyer.com/blog/working-later-bridging-your-code-with-the-background)Jim looks at making decisions about background processing without rearranging your code.


Jobs

- [Senior Software Developer - Liberty Mutual Insurance (King of Prussia PA, USA)](https://lmig.taleo.net/careersection/lmigcorp/jobdetail.ftl?job=81321)Do you have a wide skillset and specialize in Ruby on Rails? We're looking for someone to work on a variety of rapidly-adapting missions that will be innovative, new to the industry, using the best technology available. Liberty Mutual Insurance
- [Senior Software Developer – Liberty Mutual Insurance (Seattle, WA, USA)](https://lmig.taleo.net/careersection/lmigcorp/jobdetail.ftl?job=78979)Specialize in Ruby on Rails? We're looking for someone to work on a variety of missions including a SAFe Agile Methodology with intensive testing efforts, automation and working with User Experience designers. Liberty Mutual Insurance

In brief

- [Strange Behavior with '_' (underscore) in IRB](http://stackoverflow.com/q/41472226/3951?utm_source=rubyweekly&utm_medium=email) tutorial 
If you don’t know what _ does, it’s worth knowing. Stack Overflow
- [Building a Dynamic Instrumentation Agent for Ruby](https://blog.sqreen.io/dynamic-instrumentation-agent-for-ruby/?utm_source=rubyweekly&utm_medium=email) tutorial Jean-Baptiste Aviat
- [RStream Processing of Shell Commands](http://mensfeld.pl/2016/12/ruby-stream-processing-of-shell-command-results/?utm_source=rubyweekly&utm_medium=email) tutorial 
A look at different ways to handle the results of shell commands, optimizing for memory. Maciej Mensfeld
- [Learn Elixir with a Rubyist](http://joaomdmoura.com/articles/learn-elixir-with-a-rubyist-episode-ii?utm_source=rubyweekly&utm_medium=email) tutorial 
The second post ([first post](http://joaomdmoura.com/articles/learn-elixir-with-a-rubyist-episode-i)) in an ongoing series on Elixir from a Rubyist’s perspective. João M. D. Moura
- [Write Your Own Rack Middleware](http://blog.redpanthers.co/rack-middleware/?utm_source=rubyweekly&utm_medium=email) tutorial Anjana Krishnan
- [Indexing PDF for Searching](https://medium.com/@obahareth/indexing-pdf-or-other-file-contents-for-searching-b2499c23568f?utm_source=rubyweekly&utm_medium=email) tutorial 
Using Apache Tika and Algolia to parse, index, and search PDF files. Omar Bahareth
- [Your First Progressive Webapp on Rails](https://dev.to/rossta/your-first-progressive-web-app-on-rails?utm_source=rubyweekly&utm_medium=email) tutorial Ross Kaffenberger
- [Provide Useful Errors From Your Rails API](https://medium.com/@stevenpetryk/providing-useful-error-responses-in-a-rails-api-24c004b31a2e?utm_source=rubyweekly&utm_medium=email) tutorial Steven Petryk
- [Use Pundit to Protect Your Rails API](https://sergiotapia.me/using-pundit-to-protect-your-rails-api-3f13b238b183#.ytlep55oc?utm_source=rubyweekly&utm_medium=email) tutorial Sergio Tapia
- [How to Scrape Websites with Ruby and Mechanize](http://readysteadycode.com/howto-scrape-websites-with-ruby-and-mechanize?utm_source=rubyweekly&utm_medium=email) tutorial 
I’ve been doing some of this lately and found [this guide to preserving sessions](http://www.virtuouscode.com/2016/06/17/preserving-session-with-mechanize/) useful too. Tim Craft
- [Estimating CPU Per Query With Weighted Linear Regression](https://www.vividcortex.com/resources/estimating-cpu-per-query-with-weighted-linear-regression?utm_campaign=Ruby%20Weekly&utm_source=ppc) tutorial 
This ebook explains how a specialization of linear regression answers seemingly unsolvable database questions. VividCortexSponsored
- [How to (Temporarily) Use Any Gem in the Rails Production Console](http://www.ombulabs.com/blog/rails/ruby/how-to-use-any-gem-in-production-console.html?utm_source=rubyweekly&utm_medium=email) tutorial Mauro Otonelli
- [Daru: Data Analysis in Ruby](http://blog.alex-miller.co/ruby/2016/12/24/what-can-daru-do-for-you.html?utm_source=rubyweekly&utm_medium=email) tutorial Alex Miller
- [Switching from a PHP to a Ruby Stack without Downtime](http://blog.penso.info/2016/12/28/how-to-switch-a-stack-without-downtime/?utm_source=rubyweekly&utm_medium=email) story Fabien Penso
- [It's Time to Go HTTPS-Only in Rails (with Let's Encrypt)](https://everydayrails.com/2017/01/09/rails-https-only-lets-encrypt-ssl.html?utm_source=rubyweekly&utm_medium=email) opinion Aaron Sumner
- [Security and Static Code Analyzers](https://www.driftingruby.com/episodes/security-and-static-code-analyzers?utm_source=rubyweekly&utm_medium=email) video Drifting Ruby
- [Try Codeship Pro: Free CI with Native Docker Support](https://codeship.com/features/pro-aw?utm_medium=cpc-ruby-weekly-secondary&utm_campaign=pro-features-campaign-cooper) tools 
Ship your Docker apps faster with Codeship Pro. Try our new free tier and get 100 free builds per month. CodeshipSponsored
- [invisible_captcha: Unobtrusive Spam Protection for Rails](https://github.com/markets/invisible_captcha?utm_source=rubyweekly&utm_medium=email) code Marc Anguera Insa
- [terjira: A CLI Tool for Jira](https://github.com/keepcosmos/terjira?utm_source=rubyweekly&utm_medium=email) code Jaehyun Shin
- [Squib: A DSL for Prototyping Card Games](http://squib.rocks/?utm_source=rubyweekly&utm_medium=email) code Andy Meneely

Curated by [Peter Cooper](https://twitter.com/peterc) and [Glenn Goodrich](https://twitter.com/ruprict), and published by [Cooperpress](https://cooperpress.com/).
Send feedback by simply replying to this mail.
Want to sponsor an issue? See our [media kit.](https://cooperpress.com/mediakit)
Want to post a job? Email us or [use our self-serve system.](https://booking.cooperpress.com/jobs)

[Unsubscribe](*|UNSUB|*) | [Change email address](*|UPDATE_PROFILE|*) | [Read this issue on the Web](http://rubyweekly.com/issues/331)

© Cooperpress Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK
[Email policy](https://cooperpress.com/spam.html) [Privacy policy](https://cooperpress.com/privacy.html)
