RubyGems.org | your community gem host
Hey, #ruby folks! I've been one of the #RubyGems maintainers for the last decade.
Ruby Central has forcefully taken control of the RubyGems organization on GitHub, the `rubygems-update` and `bundler` gems on rubygems[.]org, and more.
You can read the details here: pup-e.com/goodbye-ruby...
19.09.2025 07:51
π 327
π 164
π¬ 15
π 32
Here is example usage
20.07.2025 11:59
π 0
π 0
π¬ 0
π 0
Introducing On Rails. A New Podcast.
rubyonrails.org/2025/6/25/on...
25.06.2025 13:11
π 28
π 8
π¬ 0
π 0
CleanShot X for Mac
Capture your Macβs screen like a pro.
I'm now maybe using this 10-20 times a day. I haven't realized how hard was to select UI text, errors and similar on modern Desktops.
cleanshot.com
02.04.2025 21:47
π 0
π 0
π¬ 0
π 0
One of the biggest "AI" powered productivity boosters, started using recently, is CleanShotX Capture text (OCR). I just click CMD+6 pick and area form my screen and get the text there into the clipboard.
02.04.2025 21:47
π 0
π 0
π¬ 1
π 0
I'm seriously impressed with the new ChatGPT image generator. I gave him couple screenshots of sales slides. Asked it to generate icons for couple of features. Then change background and replace $ with β¬ in the icons and result were quite good.
26.03.2025 22:01
π 0
π 0
π¬ 0
π 0
I think is more about the Digital Markets Act, which doesnβt allow vendors to favor themselves. An example is the screen mirroring of the iPhone on the Mac, being disabled in EU.
11.03.2025 06:18
π 0
π 0
π¬ 0
π 0
The best way to avoid database queries is to avoid making them. Counter caches help with that. Active Record built-in counter cache is good but doesn't handle conditions and deltas.
If you want to learn more about counter caches, I have a whole post about them π
tips.rstankov.com/p/counter-ca...
25.01.2025 21:07
π 0
π 0
π¬ 0
π 0
Hire me! - Tim Riley
After 15 years at Buildkite, Culture Amp and Icelab, Iβm available for hire!
Iβm an effective, versatile and compassionate technical leader, and an accomplished Rubyist. Iβm looking for remote Princi...
After 15 years off the market, Iβm available for hire!
Iβm an effective, versatile and compassionate technical leader, and an accomplished Rubyist. Iβm looking for remote Principal or Staff Engineer roles, at 4 days/week.
Find out more: timriley.info/posts/hire-me
20.01.2025 01:07
π 45
π 34
π¬ 2
π 3
More GIT aliases π
github.com/RStankov/con...
11.01.2025 13:14
π 0
π 0
π¬ 0
π 0
# .gitconfig
[alias]
delete-merged = !git branch --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" { print $1 }' | xargs -r git branch -D
sync = !git switch `git remote show origin | sed -n '/HEAD branch/s/.*: //p'` && git pull --prune && git delete-merged`
11.01.2025 13:14
π 0
π 0
π¬ 1
π 0
One of my favorite git aliases is "git sync". It fetches the main branch and deletes all local branches merged upstream. π»
Code π
11.01.2025 13:14
π 1
π 0
π¬ 1
π 0
Embedding YouTube videos?
Add ?rel=0 to the embed URL to hide those distracting "More videos" suggestions at the end.
Keep your audience focused on YOUR content! π‘
10.01.2025 10:02
π 11
π 3
π¬ 0
π 0
One underrated skill for a software engineer is to design database tables/collections/fields and such. There is surprisingly little content about it, and it is an essential skill for most projects.
06.01.2025 17:18
π 1
π 0
π¬ 0
π 0
The book is about an astronomer chasing a computer hacker who broke into a computer at the Lawrence Berkeley National Laboratory in 1986.
04.01.2025 10:09
π 0
π 0
π¬ 0
π 0
The Cuckoo's Egg: Tracking a Spy Through the Maze of Coβ¦
Before the Internet became widely known as a global tooβ¦
My favourite book of 2024 was The Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage. π
It's an amazing book, especially when you realize this is a real story, not just a novel π€©
www.goodreads.com/book/show/18...
04.01.2025 10:09
π 0
π 0
π¬ 1
π 0
Itβs like 1978 all over again
30.12.2024 08:43
π 1
π 0
π¬ 1
π 0
Tips for Using Less JavaScript
Practical tips to optimize your web performance by using HTML and CSS instead of JavaScript for common tasks like state management, responsive design, and UI elements.
Here are some tips on how to write less JavaScript. People often write JS for things that the browser can do automatically.
What tips do you have where we can use CSS instead of JavaScript? π€
tips.rstankov.com/p/tips-for-u...
28.12.2024 11:33
π 4
π 0
π¬ 0
π 0
Didn't know about `direct` and `resolve` might handle this custom URL, I want to get. Thanks a lot π
21.12.2024 22:28
π 1
π 0
π¬ 1
π 0
People always ask how to become a top engineer. One easy trick is to check your production error tracking weekly and fix several errors every week.
Engaging with your production error tracker is not just about fixing errors. It's a valuable learning journey.
21.12.2024 16:53
π 1
π 1
π¬ 1
π 0
The next day, I used some of the techniques we talked about π
21.12.2024 14:45
π 1
π 0
π¬ 1
π 0
Express your video by writing your own gems βΒ Ruby Banitsa conf 2024
YouTube video by Kasper Timm Hansen
I uploaded my screen recording from the recent Ruby Banitsa conf. It's pretty loose and informal!
We had a really fun conversation towards the end with @rstankov.bsky.social and @ventsi.bsky.social chiming in! Hope my mic picked it up π
www.youtube.com/watch?v=Md90...
20.12.2024 19:25
π 5
π 2
π¬ 1
π 0
ActiveJob::Performs
ActiveJob::Performs adds a performs class method to make the model + job loop vastly more conventional. You use it like this:
class Post < ApplicationRecord
performs :publish
# Or `performs def publish`!
def publish
# Some logic to publish a post
end
end
Then we build a job for the instance method and define a post.publish_later instance method, and more:
class Post < ApplicationRecord
class Job < ApplicationJob; end # We build a general Job class to share configuration between method jobs.
# Individual method jobs inherit from the `Post::Job` defined above.
class PublishJob < Job
# We generate the required `perform` method passing in the `post` and calling `publish` on it.
def perform(post, *, **) = post.publish(*, **)
end
# On Rails 7.1, where `ActiveJob.perform_all_later` exists, we also generate
# a bulk method to enqueue many jobs at once. So you can do this:
#
# Post.unpublished.in_batches.each(&:publish_later_bulk)
def self.publish_later_bulk
ActiveJob.perform_all_later all.map { PublishJob.new(_1) }
end
# We generate `publish_later` to wrap the job execution forwarding arguments and options.
def publish_later(*, **) = PublishJob.perform_later(self, *, **)
def publish
# Some logic to publish a post.
end
end
Benefits
Conventional Jobs: they'll now mostly call instance methods like publish_later -> publish.
Follows Rails' internal conventions: this borrows from ActionMailbox::InboundEmail#process_later calling process and ActionMailer::Base#deliver_later calling deliver.
Clarity & less guess work: the _later methods standardize how you call jobs throughout your app, so you can instantly tell what's happening.
Less tedium: getting an instance method run in the background is just now a performs call with some potential configuration.
Fewer files to manage: you don't have to dig up something in app/jobs just to learn almost nothing from the boilerplate in there.
Remaining jobs stand out: app/jobs is way lighter, so any jobs in there that don't fit the performs pattern now stand out way more.
More consolidated logic: sometimes Job classes house model-level logic, but now it's all the way out in app/jobs instead of app/models, huh?
Tip
On that last point, performs does put more logic back within your Active Records, so if you need further encapsulation to prevent them growing too large, consider checking out active_record-associated_object.
Praise from people
Here's what @claudiob had to say after using ActiveJob::Performs:
Iβve been using active_job-performs for the last month and I love it love it love it!!
Your thought process behind it is so thorough. I have a bunch of jobs now attached to models and my app/jobs folder⦠is empty!!
This saves me a lot of mental hoops, I donβt have to switch between files anymore, everything is self-contained. Thank you!!!
From @andycroll in a writeup about launching UsingRails:
Iβve also adopted a couple of gemsβwith exceptional Rails-level taste and author pedigreeβthat I hadnβt used in anger before, including active_job-performs from Kasper [β¦]. Would recommend both.
And @nshki after trying it:
Spent some time playing with @kaspth's ActiveRecord::AssociatedObject and ActiveJob::Performs and wow! The conventions these gems put in place help simplify a codebase drastically. I particularly love ActiveJob::Performsβit helped me refactor out all ApplicationJob classes I had and keep important context in the right domain model.
I've been polishing up the github.com/kaspth/activ... README.
You can now see all the benefits and more praise quotes now that people are seeing this in practice β I'm really proud of where this is going! π
16.12.2024 18:37
π 9
π 4
π¬ 1
π 1
2024 is the year with the most Ruby talks in a single year, ever!
This is the first time we beat the previous all-time record from 2015!
Ruby is so back!
17.12.2024 01:13
π 66
π 22
π¬ 3
π 1
ISO 8601 has a standard for durations π
en.wikipedia.org/wiki/ISO_860...
This is very well supported. Ruby on Rails Active Support works with it and they are many JS libraries.
14.12.2024 09:08
π 0
π 0
π¬ 0
π 0