#559 — July 1, 2021 |
Ruby Weekly |
YouPlot: CLI Tool to Draw Plots on the Terminal — A bit random, but I was struck by how neat this little Ruby-powered terminal-based plotting tool was. I encounter so many such tools written in Rust or Go nowadays that seeing one in Ruby is a delight. The underlying plotting library is unicode_plot.rb if you want to pull off similar things in your own code. Red Data Tools |
Stripe's CEO Mentions Their In-House 'Ruby Compiler' — Am I impressed at the CEO of a company valued at $95bn tweeting about Ruby? Yes, I admit it. In short, this is just a tweet, but Stripe (who also build Sorbet) claims to have an ‘in-house Ruby compiler’ yielding 22-170% more performance than CRuby when powering Stripe’s API server. Patrick Collison on Twitter |
Fast Rails Deployment on Bare Metal Servers — Maxihost & Cloud 66 have partnered to make deploying and managing Rails applications on bare metal servers faster and easier. Get the power and flexibility of bare metal with the speed and simplicity of Cloud 66. Cloud 66 + Maxihost sponsor |
GitHub Copilot: An AI 'Pair Programmer' — A project that GitHub has been working on in the background for some time with OpenAI. It’s a VS Code extension that uses machine learning to suggest useful code snippets as you type – it works really well with Ruby and I've had a lot of fun playing with it. I'll be sharing a post with how it works, specifically for Rubyists, next week. GitHub |
Creating Google-Like Letter Avatars with ERB-Generated SVGs — You don’t need a graphics library to create simple avatars, as SVG can be generated on the fly with ERB, as shown here. Interesting approach. Karol Bąk |
IN BRIEF:
|
📕 Tutorials |
Set Up a Docker Container To Test Your Rails App — This is a use case tailor made for containers, which enables consistent environments and simple dependency mocking leading to more reliable tests. Milap Neupane |
▶ Configure Anything with Dry::Configurable — Stop rolling your own config classes and use this threadsafe, flexible, simple-to-use gem that handles just about any use case you can imagine. Hanami Mastery |
Using Multiple Databases in a Single Query in Rails Apps — You’re probably never going to need to do this, but if you do.. Postgres’s FDWs are very handy and will even let you work with other databases that aren’t Postgres. Karol Galanciak |
Rails 7 Adding Audio Metadata Support to ActiveStorage — Rails 6.2 added a mechanism for extracting metadata from images and videos, but Rails 7 will go a step further with audio, to get things like length and bit rate by calling out to ffprobe, a part of FFmpeg. Deepak Mahakale |
Free eBook: Efficient Search in Rails with Postgres — Speed up a search query from seconds to milliseconds and learn about exact matches, trigrams, ILIKE, and full-text. pganalyze sponsor |
Using Redis Hashes for Caching in Rails — redis_hash_store lets you use Redis hashes for caching. Omar Bahareth |
Back to Basics: Boolean Expressions — The truth is out there. Joël Quenneville |
▶ Discussing WNB.rb and Creating a Community — A chat with Jemma Issroff (who writes our tips of the week), Emily Giurleo and Sylwia Vargas about WNB.rb, a monthly Ruby meetup for women and non-binary people, and what it takes to build community generally. The Ruby on Rails Podcast podcast |
▶ From Zero to Sidekiq Hero
|
|
🛠 Code and Tools |
premailer-rails: CSS Styled Emails Without Hassle — Premailer is a drop-in-and-it-works gem that makes styling emails easy by applying CSS rules without you having to write all the styles inline. We use it as part of the Ruby Weekly production pipeline, but premailer-rails opens it up to Action Mailer too. Philipe Fatio |
Introducing idnx: Converts Internationalized Domain Names into Punycode — Punycode is a way to represent Unicode with the limited ASCII character set. HoneyryderChuck |
Still Not On Rails 6.1? FastRuby.io Can Help FastRuby.io | Rails Upgrade Services sponsor |
HTTP.rb 5: The Fast Ruby HTTP Client — My favorite Ruby HTTP library nowadays. The 5.0 release switched to the http.rb team |
Amoeba: Easy Cloning of Active Record Objects (Including Associations) — An extremely old library but recently updated and boasting Rails 6 compatibility. Vaughn Draughon |
ValidEmail2 4.0: ActiveModel Validation for Email — Check the legitimacy of email addresses including MX lookup and checking against a list of disposable email services. Micke Lisinge |
SidekiqUniqueJobs: Ensure Uniqueness of Your Sidekiq Jobs
|
|