Ruby Weekly Issue 595: March 17, 2022

0
46
Ruby Weekly Issue 595: March 17, 2022


Ruby on Whales: Dockerizing Ruby and Rails Development — There a boatload (ha!) of articles on ‘dockerizing’ Rails apps, but this newly updated one is very good and results in a nice setup, specifically for development rather than production. Plus, they’ve added a template via RailsBytes to get you using it.

Vladimir Dementyev

An Update on WebAssembly/WASI Support in Ruby — The author is both a committer to Ruby and Swift and is working on WebAssembly support in both spheres. This post presents a summary of recent progress made to bring native WebAssembly and WASI support to Ruby – likely to land in Ruby 3.2.

Yuta Saito

The Best Deployment Tool for Rails — Deploy Rails apps on any cloud, with native support for Rails conventions, full databases support, replication & backups, powerful access management & traffic control features. Try it today for free with an extra $100 in free credits with the code: RubyWeekly!

Cloud 66

The Perils of Parallel Testing in Rails — Parallel testing seems like a simple solution to speeding up your tests (run more tests at once == faster, no?) but there are considerations and gotchas, and knowing them can help you get the biggest bang for your parallel buck.

Hans-Jörg Schnedlitz (AppSignal)

IN BRIEF:

  • Brad Gessler is keen to share the value of using bundle add rather than manually adding a gem to your Gemfile, and it looks like this recommendation is going straight into the boilerplate docs generated by Bundler’s bundle gem soon.

  • 🇺🇦 Ukrainian Rubyist Victor Shepelev remains close to the danger of Russia’s invasion of Ukraine and reminds us of the peril both he and his country are in.

  • Rails 5.2.7 (a very old branch – 5.2 came out in 2018) has been released to restore support for Ruby 2.2 that had been broken. In related ‘old version’ news, Rails 6.1.5 has been released too.

Senior Back End Developer – Ruby/Rails — Peggy useas AI to transform the art market. Come hack on an elegant Rails API with our world-class and fully remote team. ROR, PG, AWS, K8S, Sidekiq.

Peggy

Join the Remote Work Revolution — We offer the freedom of freelance with the security of full-time. Start working remotely with the world’s top clients today.

Toptal

📕 Articles & Tutorials

▶  Framework Friends: A Podcast Comparing Rails and Laravel — Laravel is a popular and (very loosely) Rails-esque framework in the PHP space which DHH even recently gave some kudos to. This new podcast features developers from each ecosystem telling their stories and making comparisons.

Framework Friends podcast

Talking of Laravel, its creator, Taylor Otwell, ▶️ went on the Remote Ruby podcast too and spoke about Laravel’s origin story and how Rails has influenced it over the years.

Pipelining Without Pipes — A fun jaunt through a problem that benefits from mixing both OOP and functional bits of Ruby together showing how the language makes programmers happy.

Matheus Richard (thoughtbot)

Don’t Run Your Ruby Minitest Classes Twice“If a Minitest class inherits from another class, it will also inherit its methods causing Minitest to run the parent’s tests twice.” (There’s a typo in the example, but the point remains.)

Ignacio Chiazzo

bundle open

Sometimes, we’ll see a gem throw an unexpected error, or behave in a way that we don’t fully understand. In these cases, it can be useful to have more information. I often find it helpful to edit, or at least look at, the gem’s code directly.

bundle open <gem_name> allows us to do this. All it requires to work correctly is that we set the EDITOR (or BUNDLER_EDITOR) environment variable to our preferred editor (for example, “EDITOR=code” or “EDITOR=vim”). Then if we run bundle open <gem_name>, it will open up our editor right to the directory of the installed gem itself. We can make any changes as we’re debugging to help us figure out what is happening!

If you want to do something that’s a one off and open the sinatra gem in VS Code, say, you could also do it in a single liner like so:

EDITOR=code bundle open sinatra

This week’s tip was written by Jemma Issroff and edited by Peter Cooper.



Source link

Leave a reply

Please enter your comment!
Please enter your name here