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.
28 May 2024
Gemfile of dreams: the libraries we use to build Rails apps
From time immemorial, the Evil Martians team has worked on dozens of Ruby on Rails projects. Naturally, this involves a lot of Ruby gems. Some reflect our desire to be cutting-edge and use modern tools (or build our own!) Other gems are so flexible they’ve been used in most of our projects. Our development philosophies, programming habits, (and soul) are within this universe of Martian gems. So what would it look like if they were somehow able to converge into one gemfile—the ideal Martian Gemfile, the toolbox of the extraterrestrial Rails engineer? Gemfile of dreams: the libraries we use to build Rails apps
ERb, Whitespace, and Indentation in Rails Generator Templates
Basic strategies for managing whitespace in generator ERb templates and their output. We can use whitespace-eliminating delimiters from ERb, generator helper methods, and built-in indentation helpers. https://garrettdimon.com/journal/posts/erb-whitespace-and-indentation-in-rails-generator-templates
Glimmer DSL for XML 1.4.0 HTML To Glimmer Converter
Glimmer DSL for XML (& HTML) 1.4.0 has been released! It includes a new HTML To Glimmer Converter that can automatically convert any legacy HTML code into Glimmer DSL Ruby code. Glimmer DSL for Web (Ruby in the Browser Web Frontend Framework) has been upgraded to include both Glimmer DSL for XML 1.4.0 and Glimmer DSL for CSS 1.4.0. https://andymaleh.blogspot.com/2024/05/glimmer-dsl-for-xml-140-html-to-glimmer.html
How to reuse the same page in different Turbo Frame flows
An elegant use of Turbo-Frame
request header to use the same page in different frame flows, different parts of UI: How to reuse the same page in different Turbo Frame flows
Launch of upgradecode.io: Simplify Your Code Upgrades!
We’re thrilled to announce the launch of upgradecode.io, a cutting-edge platform designed to streamline and simplify the process of upgrading your projects. Our platform offers automated tools to analyze your code, identify necessary updates, and provide actionable recommendations and patches. Whether you’re upgrading Ruby, Rails, or JavaScript projects, upgradecode.io makes your transition smoother with detailed insights and guided updates. We created a video to demonstrate this for you https://synvert.substack.com/p/launch-of-upgradecodeio-simplify
27 May 2024
25 May 2024
RailsConf 2024 Highlights
Best moments from RailsConf 2024 in Detroit: https://www.hexdevs.com/posts/railsconf-2024-highlights/
Ruby Fusion - Function Composition
Hey, folks. 👋 The next Ruby Fusion gathering is nearing: June 6th at 6:30pm MDT. We’ll be talking about function composition and unlocking the power of closures (i.e. procs, lambas, methods, etc). Registering and attending this virtual gathering is free so sign up if you can make it!
24 May 2024
Glimmer DSL for WX 0.1.0 Hello, Data-Binding!
The wxRuby3 Ruby binding for wxWidgets (a very mature native cross-platform GUI toolkit) finally went version 1.0, so Glimmer DSL for WX, which runs on top of wxRuby3, has been upgraded to use version 1.0 by default. Also, a new feature has been added that is already available in most other Glimmer GUI DSLs: Unidirectional/Bidirectional Data-Binding. https://andymaleh.blogspot.com/2024/05/glimmer-dsl-for-wx-010-hello-data.html
23 May 2024
[redis_queud_locks] version 1.5.0 released
The new version of RedisQueuedLocks (distributed redis locks with a queue capabilites in AdvisoryLock manner) released with a support for sampling logger: you can set the percent of RQL cases that should be logged. [more inside]
How to use custom gems without changing the Gemfile
A nice technique that lets you have your custom gems in any project without introducing any changes to the git repo: https://dev.to/povilasjurcys/how-to-use-custom-gems-without-changing-gemfile-4adi
People shouldn't ask if Rails is dead! They should ask how long Rails has been dead!
People shouldn’t ask if Rails is dead! They should ask how long Rails has been dead! https://andymaleh.blogspot.com/2024/05/people-shouldnt-ask-if-rails-is-dead.html
22 May 2024
Strict Loading Using :n_plus_one_only Mode Does Not Eagerly Load Child Associations
Strict Loading Using :n_plus_one_only Mode Does Not Eagerly Load Child Associations In Rails 7.2. [more inside]
Ruby 3.4 Enable frozen_string_literal by default
Ruby 3.4 Enable frozen_string_literal by default [more inside]
Ruby Warsaw Community Conference - check what we have prepared this time!
I’m happy to announce (finally :D ) next edition of Ruby Warsaw Community Conference! [more inside]
Five Things to Avoid in Ruby
We’ll dive into five common Ruby mistakes and see how we can combat them: https://blog.appsignal.com/2024/05/22/five-things-to-avoid-in-ruby.html
21 May 2024
Adding views to an API-only Rails app
What if you started with an API-only Rails app, but now you need front-end assets and views? Jeffery Morhous has you covered!
Untangle Your Sidekiq Queues
There are lots of ways to structure your job queues, and we’ve seen them all. This is our guide to planning your queues for simplicity, resilience, and scalability.
20 May 2024
On Flaky Tests, Time Precision, and Order Dependence
A flaky test is one that fails unpredictably, without a corresponding change in the code under test. These often show up in CI runs where a test unrelated to any change made suddenly fails, and then mysteriously passes when re-run. There are many type and causes of “flakes”. Today I want to talk about flaky tests caused by time precision, and time-order dependence. [more inside]
Hanami's place in the world of Rails
https://2n.pl/blog/hanami-s-place-in-the-world-of-rails A longer article/essay about Hanami, how it fits into the world of Ruby (rails) and many other connected things along the way
Expressive Class Hierarchies through Dynamically-Instantiated Support Objects
Abstract classes don’t always stand alone, but spring to life as a part of an object cluster. Here’s how to ensure you’re always instantiating the right ones.
Glimmer DSL for CSS Media Queries + CSS To Glimmer Converter
Glimmer DSL for CSS 1.3.0 and 1.4.0 just shipped with support for CSS Media Queries and a CSS To Glimmer Converter!!! This gem is included in Glimmer DSL for Web to enable styling elements with CSS via a Ruby DSL. Glimmer is smart enough to have multi-DSL support, meaning it enables using a Ruby DSL for CSS and another Ruby DSL for HTML in the same file, and it’s all Ruby code in the end, so one language, but interpreted differently depending on the applicable domain to facilitate writing the simplest code possible for each domain. https://andymaleh.blogspot.com/2024/05/glimmer-dsl-for-css-media-queries-css.html