---
title: "Crystal 1.0"
publication: "Ruby Weekly"
issue: 545
published_at: "2021-03-25"
canonical_url: "https://rubyweekly.com/issues/545"
---

Plus a Rails dependency issue, and GitHub's race condition. |        

#545 — March 25, 2021 

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

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/ksftcphuisun2vnyqs5p.jpg)](https://github.com/rails/rails/issues/41750)  

[Rails Installation Broke Briefly as Dependency Yanked Old Versions of Gems](https://github.com/rails/rails/issues/41750) — A bit of a complicated story this! In brief, [MimeMagic](https://github.com/mimemagicrb/mimemagic) is a library for detecting the MIME type of files, but it contained a GPL licensed file for years despite the project being MIT licensed. To rectify the problem, the creator switched MimeMagic to GPL and [yanked (removed) the old versions](https://github.com/mimemagicrb/mimemagic/issues/98) upon which Rails had a dependency - oops! The author then released a new version to fix the problem, but the licensing remains a standing issue given the effects the GPL can have on consuming projects. 

Rails GitHub Issues   

[Crystal 1.0 Released: A Ruby-esque Compiled Language](https://crystal-lang.org/2021/03/22/crystal-1.0-what-to-expect.html) — Crystal is a language _heavily_ inspired by Ruby but that offers compilation, static type checking, macros, and ultimately a lot of performance. Crystal _isn’t_ Ruby but it’s close enough that I know of many Rubyists who’ve added it to their repertoire. 

The Crystal Core Team   [![\](https://copm.s3.amazonaws.com/d85e5115.png)](https://www.cloud66.com/rails/?utm_source=-&utm_medium=-&utm_campaign=RubyWeekly-21-q1-2) 

[Deploy Rails Apps with Cloud 66](https://www.cloud66.com/rails/?utm_source=-&utm_medium=-&utm_campaign=RubyWeekly-21-q1-2) — Deploy and manage your Ruby on Rails applications to any cloud or server. From code to production in minutes. Build great web applications faster, and let us take care of your infrastructure. 4-week free trial + extra $100 free credits with the code:`Ruby-Weekly!`. 

Cloud 66 sponsor   

[How GitHub Found and Fixed a Rare Race Condition in Its Session Handling](https://github.blog/2021-03-18-how-we-found-and-fixed-a-rare-race-condition-in-our-session-handling/) — If you were unceremoniously logged out of Github on March 8th, it was for your own safety as a race condition and some new code was swapping sessions between users. This post-incident report is a worthy read given their reliance on Unicorn, Rack, and Rails. 

Github   

[How to Use `to_sql` to See What Query ActiveRecord Will Generate](https://boringrails.com/tips/active-record-to-sql) — It’s not always easy to remember all of the pieces you need to construct specific queries with ActiveRecord, so this sort of live debugging and looking behind the scenes could come in useful. 

Matt Swanson     

Quick Bits 

- AWS is [ending support for Ruby 1.9, 2.0, 2.1 and 2.2](https://aws.amazon.com/blogs/developer/announcing-the-end-of-support-for-ruby-runtimes-1-9-2-0-2-1-and-2-2-for-the-aws-sdk-for-ruby/) with its AWS SDK.
- The Ruby Toolbox now has [much faster searching](https://www.ruby-toolbox.com/blog/2021-03-19/search-speed-improvements) so if you want to search for Ruby gems, [give it a go](https://www.ruby-toolbox.com/).  

💻 Jobs  

[Senior Software Engineer](https://boards.greenhouse.io/defmethod/jobs/122318) — Remote Senior Software Engineer for a software consultancy company based in NYC. 

Def Method   

[Join Mon Ami and Use your Ruby/JS Skills for Good](https://www.monami.io/jobs) — We replace antiquated software used by cities to provide Covid relief and other services to vulnerable seniors. Remote or SF. 

MonAmi   

[Find Your Next Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 

Hired  

📘 Articles & Tutorials  

[Understanding and Using Ruby's Powerful `#grep` Method](https://docs.knapsackpro.com/2021/understanding-and-using-rubys-powerful-grep-method) — `Enumerable#grep` has been around since almost forever but I think it’s often forgotten and I don’t see it in a lot of production code. Here’s what it does and why it’s useful. 

Shadi Rezek   

▶[Docker Basics for Rails Developers](https://gorails.com/episodes/docker-basics-for-rails) — A look at setting up a `Dockerfile` for a Rails app and Docker Compose yml for other services you might need like Postgres or Redis. 

Chris Oliver   

[Founders/CTO’s: Application Dependencies Outdated? We Can Help](https://www.upgraderails.com) — Work with our expert team to get your apps up to date. 

Hint sponsor   

[Live Previews with Rails and Stimulus 2](https://nts.strzibny.name/rails-stimulus-live-preview/) — It’s super easy (when you see how, at least.) 

Josef Strzibny   

[RSpec Fundamentals: A Basic Glossary](https://remimercier.com/rspec-fundamentals-glossary/) — An introduction to some key terms you’ll often encounter when working with RSpec. 

Remi Mercier   

[Dead Simple Rails Monitoring](http://tomrothe.de/posts/dead-simple-rails-monitoring.html) — In less than 100 lines of code Tom created a simple but useful (and free!) monitoring solution using the ActiveSupport Instrumentation API. 

Tom Rothe   

[Writing a Buildpack for the Rails Asset Pipeline](https://technology.doximity.com/articles/writing-a-buildpack-for-the-rails-asset-pipeline) — “Buildpack” here is “Cloud Native Buildpack” (CNB) that you can use to run your code on any cloud provider. 

Genevieve L'Esperance   

[Don’t Give Up On Your Rails Generators](https://wasabigeek.com/blog/dont-give-up-on-your-rails-generators/) — Generators aren’t just for installs or scaffolding; they promote consistency and automate tasks for your development team. 

wasabigeek   

[Implementing Order with ActionCable Signalling and WebRTC](https://emmanuelhayford.com/implementing-order-with-actioncable-signalling-webrtc/) 

Emmanuel Hayford   

[Be Specific When Defining Your Rails Routes](https://andycroll.com/ruby/be-specific-when-defining-routes/) — Andy thinks you need to get a bit more specific about the routes you really need. 

Andy Croll   

[What _is_ a Rails Model?](https://www.codewithjason.com/what-is-a-rails-model/) — _“Here’s how I think about what Rails models are.”_ 

Jason Swett  

🛠 Code and Tools  

[FastStatistics: Fast Computation of Descriptive Statistics using Native Code and SIMD](https://github.com/Martin-Nyaga/fast_statistics) — Calculate things min, max, mean, median, quartiles and standard deviations on datasets from Ruby but with the power of native code and SIMD intrinsics backing you up. 

Martin Nyaga   

[Gem in a Box 1.3: Really Simple RubyGem Hosting](https://github.com/geminabox/geminabox) — A way to self-host your own gems and push new gem up just like you would with rubygems.org. 

Gem in a Box   

[Rails Multisite: Multi Tenancy for Rails Applications](https://github.com/discourse/rails_multisite) — Want each hostname used with an app to have its own database? It’s possible. This new release adds Rails 6.1+ compatibility. 

Sam Saffron   

[Collaborative, Effortless Project Management](https://clubhouse.io/?utm_source=cooperRubyWeekly&utm_medium=spon_nl) 

Clubhouse.io sponsor   

[Kiba 4.0: Data Processing and ETL Framework for Ruby](https://github.com/thbar/kiba) — The ‘go to’ framework for doing ETL jobs (when you take data from one place to another with some transformation in the middle) in Ruby. Despite the big [4.0 major version release](https://github.com/thbar/kiba/releases/tag/v4.0.0), most users shouldn’t notice any difference (unless you’re using Ruby 2.4 or the legacy runner). 

Thibaut Barrère   

[Active Record Replica: Redirect ActiveRecord Reads to Replica Databases While Ensuring Writes Go to the Primary](https://github.com/teespring/active_record_replica) 

Spring   

[CreditCardValidations: Gem for Validating Card Numbers, Generating Numbers, and Luhn Checks](https://github.com/didww/credit_card_validations) 

Igor Fedoronchuk   

[Navigable: A Small Ruby Gem with Big Ideas About Business Logic](https://github.com/first-try-software/navigable) — Navigable creates commands and observers to decouple business logic in the hopes of making extension and changes easier. 

First Try! Software         

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
