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.
Ruby 3.2 introduces Enumerator#product
https://codewithrails.com/ruby-enumerator-product - We can now create Cartesian products with multiple arrays/ranges using the convenient Enumerator.product(x, y, 1..3) syntax on Enumerator objects.
The Basics of Receiving Webhooks in Rails
Let’s take a look at the most simple, straightforward way to receive webhooks in a Ruby on Rails application.
etherscan-lite gem - light-weight machinery / helper for the Etherscan JSON HTTP API
Hello, I put together a little gem, that is, etherscan-.lite, a light-weight machinery / helper for the Etherscan JSON HTTP API. To get your started I tried the official etherscan recipe examples. 1) Get All USDT Transfers from Binance 2) Get the Latest Moonbird Non-Fungible Token (NFT) Transfers 3) List ETH deposits to Arbitrum Bridge. Happy data wrangling / processing and blockchaining with ruby. Cheers. Prost.
Coding the shell cat command in Ruby
A one-liner that copy the exact same behavior as the cat command. It works just fine with files and STDIN: SEE ONE-LINER. [more inside]
Sort a Ruby array
A short article about how to sort an array in Ruby. It’s a classic problem in other languages too, so let’s explore the Ruby case. [more inside]
3 CI/CD Jobs for Any Repository
Discover these CI/CD jobs that are both widely applicable and generally useful that they can fit into any repository. [more inside]
Speed up aggregate roots loading with snapshot events
Rails Event Store 2.7 is coming in days with a new experimental feature SnapshotRepository. https://blog.arkency.com/speed-up-aggregate-roots-loading-with-snapshot-events/
What's new in Ruby 3.2's IRB?
I wrote an article introducing new features @k0kubun and I made to IRB v1.6, which will be the built-in version of Ruby 3.2: https://st0012.dev/whats-new-in-ruby-3-2-irb
Mock Suey: Keeping mocks in line with real objects
Mock Suey is a collection of tools (and a new gem in the TestProf family) which helps to avoid false positives when using mocks in Ruby tests.
David Heinemeier Hansson on Finding the Right Balance Between Business and Technology
Ruby on Rails creator and Co-owner & CTO of 37signals David Heinemeier Hansson shares his way of doing business in the software industry. [more inside]
Halt or Handle? Dealing with errors in Hanami apps!
Handling exceptions is one of the most needed features for any application that can scale. If you are wondering, how to handle errors in Hanami 2 applications, don’t look for more. [more inside]
How to use Alpine.js with Rails & Turbo
https://codewithrails.com/alpinejs - How to install Alpine.js and build UI interactions like a modal and flash message integration
Building Technical Wealth and Improving Legacy Code with M. Scott Ford
Are you working on Ruby on Rails Applications that are constantly on fire, overwhelmed by technical debt? What if you were building Technical Wealth instead? Learn which tools & strategies to work with legacy code effectively, remove dead code, and leave tech debt behind. [more inside]
Building a New Programming Language in Ruby: Wrapping Up
The conclusion to Alex Braha Stoll’s 5-part series on how to build a toy programming language in Ruby. https://www.honeybadger.io/blog/ruby-stoffle-conclusion/
Using block-reference instead of yield + block_given?
https://www.rubycademy.com/cards/ruby-block-reference
Rubber Duck Dev Show Episode 68 | Should You Store Business Logic In Your Database?
In this episode of the Rubber Duck Dev Show, we discuss whether you should store business logic in your database: https://www.rubberduckdevshow.com/episodes/68-should-you-store-business-logic-in-your-database/
Deploying Rails and Sidekiq to Render
Here’s manual steps as well as IaC blueprint to deploy a Rails application to Render (including a Sidekiq worker).
Elixir-style Pipelines in 9 Lines of Ruby
Elixir pipelines are an elegant construct for sequencing operations in a readable way. Fortunately, 9 lines is all it takes to implement them in Ruby. [more inside]
Does A Bytes (ByteArray) Class in Ruby Make Any Sense - Why? Why Not? Discuss.
Hello, while hashing “to-the-metal” byte arrays in ruby I am revisiting / reworking the bytes gem that offers a new Bytes (ByteArray) class as a “type-safe” alternative to the String class with ASCII_8BIT / BINARY encoding. Did you know? A ruby string might be a frozen string, a string buffer, a character, a bytearray, or you name it ;-). Anyways, if anyone has any comments or tips & tricks on how to work with bytearrays (bytes) in ruby, please tell / share.
Tonic 🍸- New release with remote collections and more
A new version v0.9.0 of Tonic has been released! It essentially includes a couple of cool new features: [more inside]
A new gem: digest-lite -- more crypto(graphic) hash functions / classes in pure ruby
Hello, I put together for easy (re)use a new stand-alone gem, that is, digest-lite that includes more crypto(graphic) hash functions / classes e.g. Digest::KeccakLite (512bit, 256bit, etc), Digest::SHA3Lite (512bit, 256bit, etc) in “100% pure” ruby “lite” scripts, that is, without any c-extensions and with zero-dependency. Cheers. Prost.
A new gem: validation_errors
Validation errors happen. In some applications it might be interesting to keep track of them. This gem helps you keep track of the ActiveRecord validation errors that have been triggered on a model. [more inside]
Responsibility On Rails
Being a web-developer is one of the coolest jobs in the world. It brings freedom and growth opportunities like no other job in the world. It’s easy to just enjoy the fruits of this craft. But remember with great benefits comes great responsibility. In this article let’s explore possible negative consequences of trying random cool stuff [more inside]