The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Setting Up Rails 6.1 + Tailwind CSS 2.2 with JIT
This tutorial shows how to create a project with Rails 6.1 and its default Webpacker version (4.5), and configure Tailwind CSS with its dependencies and JIT mode enabled. You’ll end up with a project that compiles the final CSS automatically, and refreshes the browser for you as well, after every change.
Run every version of ruby, ever, with All-Ruby
Yep. That includes ruby-0.49. And it’s super easy! [more inside]
Rails 7 replaced byebug with ruby/debug
Rails 7 removed Byebug from Gemfile and added ruby/debug More Inside
Code Golf: Conditionally Add To An Array
Ruby’s expressiveness and vast API provides a myriad of ways to solve the same problem. This post proposes different ways to add elements to an array only if a certain condition applies. [more inside]
Multi-Factor Authentication for Rails With WebAuthn and Devise
If someone steals your password, they can pretend to be you. That’s why many companies provide two-factor or multi-factor authentication via a fingerprint scan, a YubiKey, an authenticator app, or SMS. In this article, Petr Hlavicka will give you a solid foundation of knowledge about multi-factor authentication and will walk you through implementation with Rails, Webauthn, and Devise https://www.honeybadger.io/blog/multi-factor-2fa-authentication-rails-webauthn-devise/
Ruby's Popular Game Library, Gosu, is having its Inaugural Game Jam
Join the first Gosu Game Jam and help choose the theme. [more inside]
Rubber Duck Dev Show Episode 12 | Programming with Dates, Times & Zones
Hear two rubyists discuss programming with dates, times and zones: https://www.rubberduckdevshow.com/episodes/12-programming-with-dates-times-zones/
Ruby 3.1 allows value omission in hash literals
Ruby 3.1 adds a shorthand syntax in Hash literals. It is similar to the shorthand syntax of objects in ECMAScript6. More Inside
Glimmer DSL for SWT 4.21 (New SWT/JDK/JRuby)
Glimmer DSL for SWT 4.21 is the quarterly major release that ships with a new version of SWT as well as other big changes like JDK 16 and JRuby 9.3.0.0 [more inside]
Turn 28px Golden Bored Apes into Damien Hirst-Inspired "Currency" Modern Art
Hello,
Using the pixelart gem I’ve put together a little artistic script - yes, in ruby -that turns any 28x28px golden bored ape into Damien Hirst-inspired high-definition (hi-def) XXXL modern art. The script uses a 2x zoom with quadruple pixels all turned into random-sized ~circles~ spots and the background filled with random Damien Hirst inspired currency-like ~circles~ spots. Change the Image#spots parameters to fit to your taste. Generate your own million $$$ art collection today. Yes, you can. Happy pixel pushing with ruby.
Using Rails 6 with Tailwind 2 JIT and Esbuild without Webpacker
TailwindCSS with Rails: The Quickest and Easiest Way [more inside]
Buffered IO Streams In Ruby
Ruby IO may not immediately write where you are asking it to. Here we explore where writing to a stream goes and when it may or may not be committed where you would expect it to.
ruby-install 0.8.3 released
ruby-install 0.8.3 has been released. This version explicitly pins the homebrew openssl dependency to openssl@1.1. OpenSSL 3.0 was released this month and is now available in homebrew. Unfortunately, ruby’s openssl bindings are still working on OpenSSL 3.0 support, so attempting to compile any current ruby version against OpenSSL 3.0 from homebrew will result in a compilation error. Until all actively supported versions of Ruby support OpenSSL 3.0, ruby-install will continue to compile against openssl@1.1 on macOS with homebrew.
Mobile ruby development with Rhodes
New release of Rhodes cross-platform solution. New version 7.4 support latest iOS, Android versions and also Sailfish, Linux, Windows, Mac OS etc(supported mobile and desktop OS). Rhodes fully open source with MIT Licence. GitHub: https://github.com/rhomobile/rhodes Rhodes solution similar to Electron.js but based on RoR-like local server instead of Node.js local server - UI the same based on WebView. Brief introduce into Rhodes: “Introducing into Rhomobile solution for developers”
Rubber Duck Dev Show Episode 11 | Modern Web Application Front Ends
Hear two rubyists discuss improvements coming to front-end web application development: https://www.rubberduckdevshow.com/episodes/11-modern-web-application-front-ends/
Ruby Pixel Art Programming Challenge #1 - 10 000 Dotty Spotty “Currency” Punks
Hello, Anyone remember the Plany Ruby Quiz - a fortnightly programming challenge? Yes, we are back with an artistic twist. Let’s start / try a new fortnightly pixel art / punk art programming challenge. Yes, in ruby. How does it work? Let’s pick a theme and then it’s up to you - yes, you can - to put together a new punk collection with your own artistic interpretation / generation script. Yes, in ruby. Let’s kick off with a theme inspired by Damien Hirst’s “The Currency” token art parody or is that cash grab with a paper with a bunch of random circles starting at $2000 a piece? Let’s generate 10 000 free dotty spotty punks. For example - turn every colored pixel in the 24x24 bitmap into a circle and maybe use different-sized variants of circles and maybe use a random offset “distortion” for the circle placement and so on. Yes, you can. Learn more and join us. Happy pixel pushing with ruby. ++ Update To get you started I put together a spots script that generates more than a dozen spotty dotty “currency” punk variants incl. a 2x version with quadruple pixels all turned into random ~circles~ spots.
ffi-libc 0.1.1 has been released
ffi-libc 0.1.1 has been released. This release fixes a major bug, where ffi-libc was still binding the libc global variables sys_errlist and sys_nerr, which glibc had deprecated and then removed, causing ffi-libc to not load. These variables are still available on BSD libc implementations. If the variables are not available, ffi-libc will ignore the FFI error and continue loading the rest of ffi-libc. [more inside]
Rails 7 adds weekday_select and weekday_options_for_select
Rails 7 adds weekday_select and weekday_options_for_select [more inside]
Improving Typescript experience in Rails by generating a Typescript schema from Rails
Improved on schema2type with associations and enums. Delivered as a simple Gist script to run in your app and built upon the enhance your Typescript developer experience. [more inside]
New job, new massive Rails codebase. Where do you even get started?
How do you add features to a codebase that is massive, scary, and completely new to you? The first day at a job is like the first day at a new school: you feel awkward, lost, and confused. But what if you could feel confident collaborating with your new team? What if you knew how to navigate any codebase? This post will help you get started at your new developer job. [more inside]
Aaron Patterson (tenderlove) live session about TenderJIT: A JIT Compiler for Ruby
Join a live programming session with Aaron Patterson (tenderlove) about TenderJIT: A Pure Ruby Just-In-Time (JIT) Compiler. We’re going to start building a JIT for Ruby from the ground up. Learn how Ruby’s virtual machine works and more about the CPU itself, and how to build a just-in-time compiler using Pure Ruby. https://www.hexdevs.com/open-source-thursdays/expert-sessions-with-aaron-patterson-sep-30th/
Rubber Duck Dev Show Episode 10 | Application Infrastructure Performance
Hear two rubyists discuss how to optimize the performance of your application’s infrastructure: https://www.rubberduckdevshow.com/episodes/10-application-infrastructure-performance/
punks.whitelabel - The Free White Label Punk Quick Starter Edition w/ Ruby
Hello, I have put together a new quick starter template, that is, /punks.whitelabel. Let’s welcome the Free White Label Punk Quick Starter Edition that let’s you (re)create from zero / scratch a pixel-perfect copy of the 10 000 CryptoPunks collection (Anno 2017). Yes, in ruby. Happy pixel pushing.
How to Reduce Memory Bloat in Ruby
The issue of memory bloat in Ruby applications is a topic of frequent discussion. [more inside]