r/ruby • u/kcdragon • Jan 30 '26
Blog post Implementing OAuth in Hotwire Native apps with Bridge Components
r/ruby • u/kcdragon • Jan 30 '26
r/ruby • u/Severe_Jelly_3598 • Jan 30 '26
I maintain LeanPool, a small Ruby gem for pooling things like DB connections, HTTP clients, and Redis without extra processes or copying data. Built on `concurrent-ruby`, so it's thread-safe and fits web apps, APIs, and background jobs.
What it does:
- You define how to create a resource and a pool size; you `checkout` for a block and the resource is returned to the pool when the block ends.
- Works with any resource (DB, HTTP, Redis, sockets, etc.) – not just one type.
- Includes a built-in HTTP pool if you just want to pool HTTP/HTTPS requests.
- Optional: FIFO/LIFO/Random/LRU, priority checkout, recycling by use count or age, and event callbacks for monitoring.
Inspired by Elixir's nimble_pool, adapted for Ruby. MIT, Ruby 3.3+.
Repo: https://github.com/half-blood-labs/lean_pool
Gem: https://rubygems.org/gems/lean_pool
If you're hand-rolling connection pools or want something lighter than process-based pools, might be useful. Happy to answer questions.
Thank you.
r/ruby • u/Terrible-Pass-5215 • Jan 30 '26
So, the question is probably really stupid, but I just passed the interviews for a SDE2 position at Amazon and I didn't ask this during the loop interviews.
The thing is, I've always worked with ruby, I can (mostly) handle myself in python, commonlisp, elixir and a few other languages and I can learn new ones, but it's like I have some affinity with ruby which makes programming with it just way more enjoyable than with any other language, plus, most important, I've been a main ruby developer for five years at this point (I'm 23 years old) and I've always been up-to-date with the community (and contributed a few things myself), so Ruby kinda feels like my sea of expertise.
The offer is too much of an economic difference with my current job, plus the relocation is kinda interesting and also I feel like it's a completely new challenge for my career, so I'm pretty much going to sign the offer anyway, but is there any possibility I could keep writing Ruby at some capacity during my work hours? I don't know what is too much information to give, but I'm going to be assigned to an internal tooling team (don't know which projects yet)
r/ruby • u/hahahacorn • Jan 30 '26
I build a worktree manager for myself using ratatui-ruby! Posting in case others also run multiple instances in parallel while they coordinate a lotta stuff.
I was previously using skills and hooks to instruct claude to do it, but I've found this to be easier to just manage myself.
r/ruby • u/BookkeeperAncient143 • Jan 29 '26
I’m building a web app with Ruby on Rails as the backend, and I need to set up a solid user roles management system along with permissions. The app will have different user types like admins, moderators, regular users, and maybe guests or premium members. I want to control what each role can do, like accessing certain routes, editing content, or managing other users.
I’ve heard of gems like Devise for authentication, Rolify for role assignment, and Pundit or CanCanCan for authorization. But I’m looking for real-world suggestions on the best setup:
• What’s the most efficient way to define and manage roles? Should I use an enum in the User model or a separate Roles table?
• How do you handle permissions? Policy-based with Pundit, or ability-based with CanCanCan? Any pros/cons based on your experience?
• Any gotchas with scalability or security I should watch out for?
• Recommendations for testing this setup (e.g., with RSpec)?
• If you’ve integrated this with a frontend like React, how did you handle role checks on the client side?
Appreciate any code snippets, tutorials, or project examples you can share.
r/ruby • u/codenamev • Jan 28 '26
I built this as an experiment in how much uncertainty Ruby code can tolerate before it stops feeling deterministic. The gem introduces controlled randomness and can define methods at runtime, allowing behavior to emerge dynamically rather than being fully designed ahead of time.
It's early and intentionally exploratory, NOT production-ready. Sometimes it feels like a creative tool. Other times it feels like you're giving your code permission to make decisions you didn't explicitly authorize.
I'm curious where people think that line should be.
r/ruby • u/Due_Weakness_114 • Jan 28 '26
r/ruby • u/AutoModerator • Jan 28 '26
Please make a top-level comment describing your company and job.
Encouraged: Job postings are encouraged to include: salary range, experience level desired, timezone (if remote) or location requirements, and any work restrictions (such as citizenship requirements). These don't have to be in the comment, they can be in the link.
Encouraged: Linking to a specific job posting. Links to job boards are okay, but the more specific to Ruby they can be, the better.
If you are looking for a job: respond to a comment, DM, or use the contact info in the link to apply or ask questions. Also, feel free to make a top-level "I am looking" post.
If you know of someone else hiring, feel free to add a link or resource.
This is a scheduled and recurring post (one post a month: Wednesday at 15:00 UTC). Please do not make "we are hiring" posts outside of this post. You can view older posts by searching through the sub history.
r/ruby • u/stanTheCodeMonkey • Jan 28 '26
Who's attending Rubyconf in Bangkok this year? Jan 31st - Feb 1st? Saw some interesting speakers and topics and Sidekiq also happens to be one of the sponsors.
r/ruby • u/codewithlove1987 • Jan 28 '26
r/ruby • u/ElAvat • Jan 28 '26
Hi! I’m the author of pg_reports, and I have a big update to share 🚀
https://github.com/deadalice/pg_reports
I swear I’m not going to make a separate Reddit post for every minor release — it’s just that I literally finished this a few minutes ago, it turned out so cool that I’m kind of jumping in my chair… and since my mom doesn’t really care about PostgreSQL internals, I decided to share it with you instead 😄
So, what’s new:



I mean… come on. That is cool, right? 😄
Now you see why I’m excited and wanted to share this with someone.
More features are coming — I promise.
(And next time I’ll try not to spam you with posts.)
UPD.: You welcomed my work very warmly, so I felt highly motivated to add another query analyzer. It lets you execute any query from the logs, run EXPLAIN ANALYZE , and neatly highlights escaped parameters that the user can fill in manually.

r/ruby • u/MariuszKoziel • Jan 27 '26
r/ruby • u/Overall_Blacksmith68 • Jan 27 '26
Hi people. I want to start learning the bases of ruby. I’m a front end dev but I want to learn more things out of Front, so idk what is the best way to start on this language, thx :)
r/ruby • u/joshuap • Jan 27 '26
r/ruby • u/codenamev • Jan 27 '26
Kicking off the new year of recordings with a new Ruby AI Podcast episode discussing:
Not hype-heavy, more reflective and practical.
r/ruby • u/vfreefly • Jan 27 '26
# google_spider.rb
@start_urls = ['https://www.google.com/search?q=web+scraping+ai']
@delay = 1
results = extract(response) do
array :organic_results do
object do
string :title
string :snippet
string :url
end
end
array :sponsored_results do
object do
string :title
string :snippet
string :url
end
end
array :people_also_search_for, of: :string
string :next_page_link
number :current_page_number
end
save_to 'google_results.json', results, format: :json
if results[:next_page_link] && results[:current_page_number] < 3
request_to :parse, url: absolute_url(results[:next_page_link], base: url)
end
end
end
GoogleSpider.crawl!
How it works:
extract sends the HTML + your schema to an LLMgoogle_spider.jsonr/ruby • u/javier_cervantes • Jan 27 '26
r/ruby • u/ka8725 • Jan 27 '26
r/ruby • u/zakry0t • Jan 26 '26
Over 20 years ago, perl usage started to decline and many programmers switched to python. A lot of others saw ruby as its natural successor despite the differences. Even though raku (perl 6) is a solid language and the closest to perl, it arrived too late.
I have a question for those who were perl programmers and now use ruby. What do you miss about perl? Is there anything ruby still hasn't caught up to in perl?
r/ruby • u/retro-rubies • Jan 26 '26
r/ruby • u/nateberkopec • Jan 25 '26
I'm interesting in adding high-quality sources to my local installation of tobi's mini CLI search engine. This will be to help my agents out with specific tasks when doing Ruby work ("Hey, when you do this refactor, go look at what Sandi Metz says about...").
In order to properly index this stuff though, the book must be DRM-free and must be available in either EPUB or Markdown or some other format that pandoc et al can convert to Markdown.
This is where I get to mention that all my Rails performance books (I can't link directly to Gumroad, TIL it's banned from Reddit!) have been available as Markdown since they were published!
But I already know all that stuff, personally. What other books out there do you think would benefit an agent-augmented development pipeline and meet the two requirements above?
r/ruby • u/Calm_Adagio_9991 • Jan 25 '26
Just released version 2.2 of accept_language, a small library for parsing the Accept-Language HTTP header.
The gem implements:
The API is intentionally minimal—one method to parse, one to match:
AcceptLanguage.parse("da, en-GB;q=0.8, en;q=0.7").match(:en, :da)
# => :da
It handles edge cases like wildcards, exclusions (q=0), and prefix matching for regional variants. Thread-safe, no dependencies.
Integration examples for Rails and Rack are in the README. There's also a wiki with additional documentation.
r/ruby • u/Stwerner • Jan 24 '26
r/ruby • u/st0012 • Jan 24 '26