r/ruby • u/jasonswett • 15h ago
Call Things What They Are
r/ruby • u/AutoModerator • 22d ago
FORMAT HAS CHANGED PLEASE READ FULL DESCRIPTION
This thread will be periodically stickied to the top of the sub for improved visibility.
You can also find older posts again via the Megathreads" list, which is a dropdown at the top of the page on new Reddit, and a section in the sidebar under "Useful Links" on old Reddit.
Please adhere to the following rules when posting: Rules for individuals:
You don't need to follow a strict template, but consider the relevant sections of the employer template. As an example:
TYPE: [Full time, part time, internship, contract, etc.]
LOCATION: [Mention whether you care about location/remote/visa]
LINKS: [LinkedIn, GitHub, blog, etc.]
DESCRIPTION: [Briefly describe your experience. Not a full resume; send that after you've been contacted)]
Contact: [How can someone get in touch with you?]Please base your comment on the following template:
COMPANY: [Company name; optionally link to your company's website or careers page.]
TYPE: [Full-time, part-time, internship, contract, etc.]
LOCATION: [Where are your office or offices located? If your workplace language isn't English-speaking, please specify it.]
REMOTE: [Do you offer the option of working remotely? Please state clearly if remote work is restricted to certain regions or time zones, or if availability within a certain time of day is expected or required.]
VISA: [Does your company sponsor visas?]
DESCRIPTION: [What does your company do, and what are you using Rust for? How much experience are you seeking, and what seniority levels are you hiring for? The more details, the better. If you are listing several positions in the "Description" field above, then feel free to include this information inline above, and put "See above" in this field.]
ESTIMATED COMPENSATION: [Be courteous to your potential future colleagues by attempting to provide at least a rough expectation of wages/salary. See section below for more information.]
CONTACT: [How can someone get in touch with you?]If compensation is negotiable, please attempt to provide at least a base estimate from which to begin negotiations. If compensation is highly variable, then feel free to provide a range.
If compensation is expected to be offset by other benefits, then please include that information here as well. If you don't have firm numbers but do have relative expectations of candidate expertise (e.g. entry-level, senior), then you may include that here. If you truly have no information, then put "Uncertain" here.
Note that many jurisdictions (including several U.S. states) require salary ranges on job postings by law. If your company is based in one of these locations or you plan to hire employees who reside in any of these locations, you are likely subject to these laws. Other jurisdictions may require salary information to be available upon request or be provided after the first interview. To avoid issues, we recommend that all postings provide salary information.
You must state clearly in your posting if you are planning to compensate employees partially or fully in something other than fiat currency (e.g., cryptocurrency, stock options, equity, etc). Do not put just "Uncertain" in this case, as the default assumption is that the compensation will be 100% fiat. Postings that fail to comply will be removed. Thank you.
r/ruby • u/_joeldrapper • 12h ago
We just released the first beta of Phlex 3, which includes a special Ruby-to-Ruby just-in-time compiler, allowing us to optimise performance far beyond whatâs possible at runtime.
The compiler starts from whatâs actually loaded. It asks each componentâs live methods where they were defined, parses those files with Prism and turns them into a syntax tree.
Then it walks the tree and decides what each call really means by asking the running program: is div still Phlexâs div, or has someone overridden it, refined it or mixed something over it? Is that constant still the string it was? Each call we can prove is ours is replaced with a node that just appends text. Everything else is left as it was.
Next comes fusing: neighbouring appends merge, so a run of static elements becomes a single string, escaped and serialised once.
Finally, the tree is formatted back into Ruby, with a source map so that errors point to your original file and line, and this is evaluated in place of the original methods.
I posted more details including some micro benchmark results. You can also see the full release notes on GitHub.
I donât know if this is going to work or if weâre going to discover some new edge case we hadnât thought of, but it looks promising so far and itâs been running in production with 465 components for over 24 hours without any issues.
A lesson from maintaining legacy Ruby on Rails apps.
r/ruby • u/nateberkopec • 1d ago
Vibe coded in an hour. Please send all feedback to https://github.com/nateberkopec/stylebench. If you wish there was a model here that I didn't include, go run it yourself!
We are happy to announce the release of JRuby 9.4.16.0, a sponsored release mostly containing third-party security updates. Users still on JRuby 9.4 are encouraged to update and sign up for support services at https://headius.com to assist with future releases and upgrading to JRuby 10.x.
JRuby 9.4.x targets Ruby 3.1 compatibility.
Thank you to our contributors this release, you help keep JRuby moving forward! @jessecai33, @mnpoonia
Updated several dependencies to pick up security fixes.
r/ruby • u/chrisrackstallion • 3d ago
**Edited to better explain my ramblings. Hopefully...
Morning all,
You ask a coding agent to refactor the comments view. It breaks reply nesting, and this spec fails:
it "shows replies nested under their parent" do
expect(page).to have_css(".comment .comment", text: "Nice post")
expect(page).to have_css(".comment[data-depth='1']")
endThe agent "fixes" the failure by deleting the second assertion. The suite is green. The only evidence is one hunk in a 600 line diff, and nothing tells you that this spec mattered more than the forty around it.
Tests protect your code, but nothing protects the tests. That matters once agents write both.
I've released agent_primitives, a gem that covers that gap. It has two parts.
1. You write down what the app must keep doing. Each capability gets a short doc with plain numbered sentences:
I1 â A reader can reply to any comment.
I2 â Replies show nested under their parent.2. You tag the specs that prove each sentence.
it "shows replies nested under their parent", intent: "comment_threads#I2" doThese are ordinary RSpec examples and they run as before. The tag is just metadata.
Now the same agent edit gets reported:
$ bundle exec agent_primitives guard --base main
spec/system/comment_threads_spec.rb
7:1 N the example proving comment_threads#I2 lost 1 assertion(s) â it still carries the tag while proving less of the clause [proof/weakened]If the agent deletes the example outright, the check that runs in CI fails:
$ bundle exec agent_primitives evals
docs/primitives/capabilities/comment_threads.md
9:1 E spec/system/comment_threads_spec.rb carries no `intent: "comment_threads#I2"` tag [evaluation/untagged]
1 capability, 4 clauses â 1 offenceRewording a sentence is reported too, so an agent can't change what the app is supposed to do without you seeing it.
A few other things it does:
It needs RSpec and an agent that can load skills.
gem "agent_primitives", group: :developmentSource and README: GitHub - pitch-sourcery/agent_primitives ¡ GitHub
I extracted it from the harness I use every day on my own startup's Rails app. It's a 0.1.0, so tell me where it's confusing or wrong.
r/ruby • u/Much-Stable-449 • 7d ago
I've been working on a Ruby project called pinterest-dl and thought it would be nice to have a few other developers involved in it
It's a tool for extracting media URLs from Pinterest and downloading images and videos
I'd like to find a couple of Ruby developers who are interested in working on it together â things like improving the code, writing tests, fixing bugs and coming up with new ideas or features
You don't have to be an expert or have tons of experience
I'm just looking for people who enjoy Ruby and are interested in contributing to an open-source project
It would be nice to have a few people to share ideas with and build this thing together instead of working on everything alone :)
Here's the repo if you want to check it out:
https://github.com/monji024/pinterest-dl
Feel free to reach out if you're interested!
r/ruby • u/Mandarinez • 7d ago
r/ruby • u/andrewmcodes • 9d ago
New Remote Ruby episode is out!
This week Chris, David, and I talk about how AI is changing Ruby development, including:
- My five-file rule for AI-generated pull requests
- Stacked PRs and parallel AI coding sessions
- Automating dependency updates and security fixes
- RubyGems, Bundler, and Active Record improvements
How are you keeping AI-generated code manageable and reviewable?
r/ruby • u/127001-sweet-127001 • 11d ago
A method-count limit wouldn't flag this class:
class InvoiceService
def charge; @gateway.charge; end
def refund; @gateway.refund; end
def render; @template.render; end
def filename; @template.filename; end
endIt's only four methods. But charge/refund operate on one field, while render/filename operate on another. If you're looking for a possible payment/rendering split, that's a more interesting signal than the size alone.
I work on ArchUnitRuby, a free MIT-licensed gem. Its LCOM4 implementation counts connected groups of methods through shared fields. On this source it returns 2:
require 'archunit'
scope = ArchUnit.metrics('.')
.for_classes_matching('InvoiceService')
scope.lcom.lcom4.measure.each do |item|
puts "#{item.identifier}: #{item.value}"
endChange the four methods to charge, refund, void and status, all using @gateway, and the same measurement is 1. The method count is still four.
I wouldn't turn that into a universal "LCOM4 must equal 1" gate. A constructor touching both fields can connect these groups, and Ruby methods that collaborate through calls won't necessarily share a field. This implementation measures field sharing, not whether your domain model is good.
A useful thing to inspect, though
For me the interesting use is narrowing a review: find a service with separated groups, look at what each group does, then decide whether splitting it actually makes the code easier to change. The number starts that conversation; it doesn't settle it.
The measurement API shown here is in the published archunit gem, version 1.0.0.
r/ruby • u/Ok_Stomach6651 • 13d ago
r/ruby • u/ffmegaman • 13d ago
After work, I am always building my side projects, usually in Ruby and/or Rails. Over the years I have accumulated a lot of small web apps and now with AI, I'm building more apps at a faster rate. They all need error tracking, APM, and uptime monitoring. I don't want to have to keep paying for monitoring services, especially since my apps are all so small, so I decided I would just build one to handle all my errors, uptime, and APM needs.
I've open sourced the web app here https://github.com/creativesorcery/goodsorcery_web
And corresponding ruby client gem here https://github.com/creativesorcery/goodsorcery-ruby
It doesn't have all the bells and whistles, but I think it gets the job done at least for my needs. I did add an MCP endpoint there, so AI agents can query and investigate errors and APM data. I hope others will find it useful.
r/ruby • u/robbyrussell • 13d ago
r/ruby • u/127001-sweet-127001 • 13d ago
Store and ::Billing::Store aren't interchangeable names just because they end the same way. Once a Ruby project has nested namespaces, a dependency tool needs to account for where a reference lives.
I maintain ArchUnitRuby. Its opt-in constant analysis resolves known project definitions and records the dependency on the defining file, rather than treating every occurrence of the word Store as the same thing.
The supported lookup model includes lexical nesting and explicit root-qualified references. It also has limits: reopened definitions can be ambiguous, and dynamic constant operations aren't a license to guess which file owns a name.
I verified a qualified project-constant reference against a file boundary: it produced a violation, while unrelated code in the same selected file passed. The constant didn't need a matching require_relative to appear in the graph.
This is useful when import-only rules are too quiet for your Ruby codebase. Enable dependency_analysis: :imports_and_constants deliberately and review the documented lookup limits before treating the graph as complete.
r/ruby • u/Much-Stable-449 • 14d ago
I started this because downloading stuff from Pinterest can be surprisingly annoying.
Sometimes you just want the original image, sometimes it's a video, sometimes it's buried in a board, and sometimes the website decides to make a simple request way more complicated than it needs to be.
So I started building pinterest-dl.
A few things I wanted to solve:
It's not just a CLI either. I wanted it to work as a Ruby library, so it can be used in scripts and other applications too.
I'm sure there are things I could've done better, so I'd genuinely like to hear what other Ruby developers think about the implementation and API.
Repo: https://github.com/monji024/pinterest-dl
I thought this would be a tiny weekend project. Apparently, Pinterest had other plans.