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.
19 January 2023
Uniqueness validation does not work since the beginning of Ruby on Rails
Check out my recent article about the uniqueness validation problem and how to solve it. Spoiler: unique index is not enough! https://evgeniydemin.medium.com/uniqueness-validation-does-not-work-since-the-beginning-of-ruby-on-rails-57f129c58576
18 January 2023
Making Sense of Rails Assets
https://fly.io/ruby-dispatch/making-sense-of-rails-assets/ - If you’re as confused about “which Rails asset pipeline to use” as I was when I wrote this, have a read! I ran into a problem today where I pulled this up to clarify a few things. It covers the differences between Sprockets, Tailwind, Dart SaaS, Webpacker, & Propshaft.
whatson gem v2023 (incl. rubyconf, pycon, & more) - tools (using the event.db gem)
Hello, in a new gem series - oldies but goldies or is it ruby isn’t dead yet? - I
try to update and polish hidden “forgotten” gems. Today let’s welcome the whatson gem, v2023 that incl. the rubyconf, pycon & more command-line tools (powered by the event.db gem machinery). Use $ rubyconf
to list upcomfing ruby conferences with day countdowns & more (sourced via the planet ruby conference2023.yml datafile. Cheers. Prost. PS: Want to learn more about python? Use $ pycon
;-).
How to Parse Arguments in Your Ruby C Extension
Let’s explore two ways to set up a complex Ruby API written in C: https://blog.appsignal.com/2023/01/18/how-to-parse-arguments-in-your-ruby-c-extension.html
Server Side Request Forgery in Rails
I wrote a blog post about Server Side Request Forgery, how it can affect Rails applications, and how to prevent it: https://greg.molnar.io/blog/server-side-request-forgery/
Binary heaps explained
An article about binary heaps, how to use them as priority queue and how to implement everything in Ruby. https://www.michalmlozniak.com/notes/binary-heaps-explained.html
Hanamismith 0.0.0 - A Hanami CLI for web apps
Hey folks. 👋 I’m excited to announce the release of Hanamismith 0.0.0. Now you can quickly generate a Hanami (plus HTMX) application and start a new age of modern web engineering. 🚀 There is also a demo application built with this gem that you can play around with as well (see link in documentation). Still more to do in this space but it’s a good start. Enjoy!
17 January 2023
little update to a cache utility gem
https://github.com/igorkasyanchuk/cache_with_locale received a new contribution, now can cache collection. [more inside]
Business Intelligence on Rails With Blazer
Business Intelligence transforms raw data into actionable insights that support business decisions through reports, dashboards, and charts. You can use the blazer gem in Ruby on Rails to gather and display business metrics! https://www.honeybadger.io/blog/blazer-business-intelligence-ruby-on-rails/
Gemfile of dreams: the libraries we use to build Rails apps
Evil Martians work on dozens of Ruby on Rails projects every year. Naturally, this involves a lot of Ruby gems. So what would it look like if they were somehow able to converge into one Gemfile—the ideal Martian Gemfile? Our development philosophies, programming habits, and soul are within this universe of Martian gems. [more inside]
Blue Ridge Ruby
A brand-new, regional Ruby conference coming June 8-9 to Asheville, NC. https://blueridgeruby.com/ (Sorry, not a technical post, but it’s my big Ruby project for the year.)
Writing better Action Mailers: Revisiting a core Rails concept
Mailers are a feature used in literally every Rails application. But they are often an after thought where we throw out the rules of well-written applications. [more inside]
16 January 2023
ethlite-contracts gem - Ready-To-Use Contract Services For Ethereum & Co.
Hello, to make it easy to get started with (blockchain) contract services for ethereum & co. I’ve started to bundle abigen generated ruby conctract classes into the ethlite-contracts gem for easy (re)use. Some first “out-of-the-gem” contract services incl. Nouns, NounsDescriptorV2, SynthNouns, PunksMeta, PunkBlocks, SynthPunks, and many more. See the ethlite-contracts rdoc for more. Happy (blockchain) programming with ruby.
Signed URLs with Ruby
Signed URLs can be a very useful solution in many cases when you need to provide limited access to some resources or actions. As the name suggests, signed URLs contain signatures that allow us to validate if they were generated by a trusted source. I’ll focus on when and how to use them in Ruby, with Rails, or by providing a custom implementation. Read more
Rubber Duck Dev Show Episode 69 | Adventures in Note Taking with Seb Wilgosz
In this episode, we discuss adventures in note taking with Seb Wilgosz: https://www.rubberduckdevshow.com/episodes/69-adventures-in-note-taking/. Seb works on the Hanami ruby framework.
What is ActiveRecord "becomes" from Rails
Have you heard about Active Record becomes? A quick post on how to take advantage of it.
Rails 7. StartKit. Release 1.0
Rails 7. StartKit. It is dockerized Rails app which can be run in 3 steps in some minutes. Most popular preinstalled tools help you to save time to start your experiments with Rails. Great for beginners, helpful even for professionals. Release 1.0
15 January 2023
Tonic 🍸- New release with filtering by query string
A new version v0.10.0
of Tonic has been released! It essentially includes a new cool and useful feature: allow to filter by URL parameteres (query string), so you can easily share your custom filtering, by just passing the URL: [more inside]
14 January 2023
Evaluating More Coverage in Ruby 3.2
Ruby’s Coverage
module can now measure coverage of eval
. Let’s explore how it works and why it’s important. [more inside]
ethers gem - Rails-Like All-In-One Umbrella For Ethereum & Co.
Hello, to make it easier to get started with blockchain (contract) programming in ruby - and inspired by the rails gem - I put together the ethers gem - a “high-level” all-in-one umbrella quick starter gem for easy installation & usage for ethereum & co. (blockchain) contract services that for now bundles crypto-lite, etherlite, etherlite-contracts, ethname, etherscan-lite, abidoc, abigen, & some more gems. The ethers name is inspired by ethers.js (or ethers.rs) and let’s you use ‘require ‘ethers’ in rubyland or ‘gem install ethers’ to get started. Anyways, it’s the early days in crypto winter 2022/23. Happy blockchain (contract) programming with ruby. Questions and comments welcome. Cheers. Prost.
13 January 2023
abigen gem - Application Binary Interface (ABI) Contract Generator for Ruby
Hello, in the ongoing crypto winter ethereum & co. programming series I put together some more gems. The new abigen gem lets you generate ready-to-use (blockchain) contract services / function calls for ethereum & co. via application binary inferfaces (abis). Bonus: Via the new natspec gem you can even “auto-include” nat(ural) spec(ification) comments / documentation in the generated ruby code. See the pre-packaged auto-generated ruby classes in the ethlite-contracts gem, for some first real-world samples.
Summary of Advent of Code 2022
I wrote a tiny summary of last Advent of Code, lessons learned, which puzzles turned out to be challenging and so on. I also posted all my solutions in Ruby with explanations. You can check them out, either to see how to solve them or to compare with yours and share feedback.