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.
Custom Turbo Stream Actions
With the release of Turbo 7.2, we gained the ability to create custom actions in Turbo. This allows us to trigger functions on the client side that would have been difficult or cumbersome to do in the past. In this episode, we look at setting up custom actions and how to use them. https://www.driftingruby.com/episodes/custom-turbo-stream-actions
Irbtools 4.0 for IRB 1.6+
More recent versions of IRB introduced a bunch of useful commands like show_doc. The arguments to these commands don’t need to be Ruby objects, so that things like show_doc String#gsub just work. [more inside]
Ruby-on-Rails bullet gem tutorial
Rails bullet gem is here to solve the N+1 query problem. Let’s create this problem first, and solve it thanks to the Rails bullet gem. [more inside]
HexaPDF 0.28.0 - Small enhancements and restructured documentation
I just released HexaPDF 0.28.0 with many small enhancements as well as a restructured documentation site and great performance numbers courtesy of Ruby 3.2.0+YJIT [more inside]
abicoder gem - New Application Binary Inteface (ABI) Coder For Ethereum & Co.
Hello, to help out all ethereum & co gems in rubyland I have started a new abicoder gem that includes application binary interface (abi) encoder & decoder for easy (re)use with zero-dependencies on any 3rd party gems incl. any of my own ;-). The idea is to work together in 2023 on any missing functionality - I have already pinged / invited the eth.rb lead. Happy blockchaining with ruby. Happy New Year. Prosit 2023! PS: A little user survey - What’s your ethereum gem of choice? Does it support tuples (or tuple arrays) in (contract) function calls?
Ruby and exception performance
Ruby has a mechanism for handling errors and exceptions in a clean and organized manner, but using exceptions too frequently or improperly can negatively impact the performance of a Ruby application. [more inside]
My First Code Commit in Ruby
This post celebrates my first code commit merged into Ruby with the years-long tale of what put me in position to make the change. https://kevinjmurphy.com/posts/my-first-code-commit-in-ruby/
ShinyGems.dev - Help maintain your favourite gems and make them shine
ShinyGems connects maintainers with passionate developers who want to make ruby ecosystem better. shinygems.dev
abiparser gem - New Application Binary Inteface (ABI) Parser For Ethereum & Co.
Hello, I have started on a new abiparser gem that includes application binary interface (abi) parser machinery / helper for Ethereum & Co. (blockchain) contracts and started to document function signature hashes (“sighashes”) / selectors and interface (type) ids and more - all using coding examples in ye good olde plain ruby. Happy blockchaining with ruby. Are abis (application binary interfaces) the new apis (application programming interfaces)? Discuss. Cheers. Prost. PS: A first (upcoming) “real-world” usage-case is the new abidoc gem that - surprise, surprise - generates abi documentation pages from public abi (contract) specs (in json) parsed with the abiparser gem.
Benchmarking Ruby 2.6 to 3.2
My yearly blog post about Ruby performance: https://gettalong.org/blog/2022/benchmarking-rubies.html
How to use JavaScript upload libraries with Active Storage
We use FilePond, a drag-drop JS upload library, and integrate it with Active Storage in this tutorial: https://codewithrails.com/filepond-active-storage
Hanami v2.0.2
Official support for Ruby 3.2 https://hanamirb.org/blog/2022/12/25/hanami-202/
Glimmer DSL for SWT 4.26.0.0
Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) has just had a major release for the quarterly update of the Eclipse SWT library, which is now up to version 4.26. Glimmer DSL for SWT now matches it with version 4.26.0.0. [more inside]
artq gem Update - Download "On-Chain" Layers / Artwork for Your Own Characters
Hello, I updated the artq gem that let’s you download complete “on-chain” layers of artwork for your own “off-chain” character designers. To get you started I downloaded 20+ layers in the Art Factory Sandbox for easy (re)use. Tip: Use the artfactory gem to generate artwork (profile pictures) from the layers (via a spritesheet) and text prompts - no A.I. stable diffusion models required ;-). Happy pixel pushing with ruby. Cheers. Prost.
Abstract Feature Branch 1.3.2
abstract_feature_branch is one of the simplest and most minimalistic “Feature Flags” ruby/rails gems out there. It enables you to get started very quickly by simply leveraging YAML files without having to set up a data store if you do not need it (albeit, you also have the option to use Redis as a very fast in-memory data store). [more inside]
Ruby Split Array
Split is a very common method not only in Ruby, but also in the programming world. Let’s see what does .split means for a Ruby Array. [more inside]
Measuring Page Speed with Lighthouse and CI/CD
If time is money, page speed is revenue. Integrating Lighthouse into your CI/CD pipeline brings valuable insights to make speed a priority during development. [more inside]
Glimmer Competition
This is a courtesy reminder of the Glimmer Competition deadline (3 weeks away). Build a code editor native desktop app in Glimmer DSL for LibUI (Ruby Desktop Development GUI Library) by Jan 15, 2023. It’s a fun educational task to do during the Christmas/New-Year break! [more inside]
content_for :devs - A new podcast from rubyists!
I’ve started Hanami Mastery in the spirit of inspire others to blog more. Today we’re taking this idea to the next level by releasing the first episode of “content_for :devs” podcast! [more inside]
Easily configure styles and apply them as classes with class_variants
We ❤️ Tailwind CSS, but sometimes it’s challenging to manage the state of some elements using conditionals. class_variants is a tiny helper that should enable you to create, configure, and apply different variants of elements as classes.
Planet Ruby & Ruby Code Commons (COCOS) Year 2022 In Review
Hello, as a long time ruby volunteer I try to contribute by managing the Planet Ruby and the (newer) Ruby Code Commons (COCOS) orgs. Believe it or not in 2022 I got perma banned on ruby-talk after getting perma banned last year on reddit ruby. And yes, so far not a single contribution on Planet Ruby or Ruby Code Commons (COCOS) in 2022. Such is the health of the ruby community in 2022. What’s your experience? Is ruby dead or dying (if you are off-rails)? Discuss. Please, share your thoughts or commentary.