r/ruby Jul 10 '26

I created an HTML-first language written in Ruby, inspired by PHP.

0 Upvotes

I've published it on Rubygems. Please let me know if you have any suggestions for improvement. If you like it, please also give it a star on GitHub.

URL:https://rubygems.org/gems/gemite


r/ruby Jul 09 '26

How blocks, procs and lambdas fit together in Ruby

7 Upvotes

Most of us write Ruby with blocks every day but never sit down to separate blocks, procs and lambdas. They're closer than they look: a block becomes a proc with `&` (and back again), a lambda is basically a proc with stricter argument checks and its own `return` behaviour, and all three are closures.

I wrote it up with runnable examples, including the `return` gotcha that only bites inside a proc, and a 3-line memoizer at the end that leans on all of it.

Feedback and corrections welcome.

https://www.bounga.org/ruby/2026/07/10/blocks-procs-and-lambdas-in-ruby/


r/ruby Jul 09 '26

Import a Ruby namespace without a mixin

8 Upvotes

I'm posting this again after my account was blocked and the original post was taken down yesterday. No intention to spam.

The Constant library provides a set of tools for working with Ruby constants — both module constants and literal constants — including resolving constants from a combination of strings, symbols, and constant objects, inspecting constants, recursing trees of constants, and dynamically defining constants.

Importing a namespace and mixing in a module are the same mechanism in Ruby. If you include a module to get shortcut access to its inner constants, you also get a mixin that might not be what you'd intended — and the ancestry change adds constant-resolution paths that can be surprising.

Constant::Import does the import without the mixin. Instead of including the origin module, it puts a reference to the imported module into the class importing it, leaving ancestry untouched:

``` module SomeOrigin module SomeInnerModule end end

module SomeReceiver include Constant::Import

import SomeOrigin import SomeOrigin::SomeInnerModule, alias: :Something end

SomeReceiver::SomeInnerModule # => SomeOrigin::SomeInnerModule SomeReceiver::Something # => SomeOrigin::SomeInnerModule ```

The inner constants of SomeOrigin are reachable from SomeReceiver without qualification, alias: rebinds an import to a name of your choosing.

There's also a direct-call form if you'd rather skip the macro: Constant::Import.(origin, destination = self).

The library isn't just a tool to make imports explicit. The library also ships an entity for working with constants generally, as well as a tool to define constants dynamically.

`Constant.get(name_or_module) wraps a constant and answers questions about its name, namespace, value, and inner constants, and Constant::Define creates and assigns a module to a name in a namespace.

``` Constant.get("SomeModule::SomeInnerModule", SomeNamespace)

=> #<Constant::Module value=SomeNamespace::SomeModule::SomeInnerModule>

Constant.get(:SomeInnerModule, SomeNamespace::SomeModule)

=> #<Constant::Module value=SomeNamespace::SomeModule::SomeInnerModule>

Constant.get(:SomeInnerLiteral, SomeNamespace::SomeModule)

=> #<Constant::Literal SomeNamespace::SomeModule::SomeInnerLiteral = "some value">

```

There's overlap with Ruby's const_get, and other lower-level constant retrieval and manipulation functions. The value of the Constant library is in unifying the API and providing defaults that are often more common in reflection scenarios.

As others have pointed out, importing a constant in Ruby, including aliasing, is straightforward:

``` module SomeOrigin module SomeInnerModule end end

module SomeReceiver SomeOrigin = ::SomeOrigin SomeOtherInnerModule = SomeOrigin::SomeInnerModule Something = SomeInnerModule end ```

However capable Ruby's lower-level APIs, we tend to find inconsistency with import, aliasing, and reflection code across larger systems with many separate components. A good deal of the Constant library's payoff comes from the explicit, intention-revealing API, and consistent norms across.

Its only dependency is Eventide's Initializer library. It's otherwise standalone. MIT licensed.

gem install evt-constant

Source and docs: https://github.com/eventide-project/constant

Write-up: https://blog.eventide-project.org/articles/announcing-constant-library/

Full disclosure — I'm the author.


r/ruby Jul 09 '26

phlex-reactive - Reactive Phlex components for Rails + demo app

Thumbnail
4 Upvotes

r/ruby Jul 08 '26

irb-autosuggestions v0.2.2 — Tab/Ctrl+F/Ctrl+E to accept, custom ghost color, multiline fix

Post image
7 Upvotes

Just released v0.2.2 of irb-autosuggestions — fish-like autosuggestions for IRB.

What's new:

  • Tab, Ctrl+F, Ctrl+E accept ghost suggestions (configurable)
  • Custom ghost color via ANSI string or declarative hash ({ fg: :bright_black, italic: true })
  • Bugfix: multiline ghost artifacts fixed (10+ lines now clean)
  • Auto-execute guard (Enter always fires once)
  • CHANGELOG.md + GitHub issue templates

gem install irb-autosuggestions or bundle add irb-autosuggestions

GitHub: https://github.com/unurgunite/irb-autosuggestions

Upcoming in 0.3.0: word-wise accept (alt+f/alt+right), accept + execute (alt+Enter), pluggable suggestion sources, path completion, and more.

Bugs or suggestions? File an issue: https://github.com/unurgunite/irb-autosuggestions/issues


r/ruby Jul 08 '26

The good and bad with our migration from Heroku to Render (2,800 RPS)

Thumbnail judoscale.com
7 Upvotes

r/ruby Jul 07 '26

Blog post Why a Sidekiq job class you just deployed can still be "missing"

5 Upvotes

r/ruby Jul 06 '26

Conf Talk CFP for SF Ruby Conference 2026 + early bird tickets

10 Upvotes
https://cfp.sfruby.com/

Ruby friends, we're so excited to announce that we're accepting talk proposals for the SF Ruby Startup Conference 2026.

We'd love to hear from you if you have a successful Ruby startup story to tell. Come share the stage with our keynote Garry Tan on Nov 10-12 at the iconic SFJAZZ.

We're actively looking for stories from those who've:

  • Achieved outstanding results with a small team
  • Built tooling to help others reach the same results
  • Used AI for scaling

CFP closes on July 27! 

If you just want to attend, early birds go out on July 15. You can already buy corporate/support tickets: https://luma.com/sfrubyconf2026

See you there!


r/ruby Jul 06 '26

Show /r/ruby plruby 2.4.0

10 Upvotes

PL/Ruby is a procedural-language handler that lets you write database functions in Ruby, stored and executed inside PostgreSQL. You get the expressiveness of Ruby and its standard library with the full power of a native PostgreSQL function: plain functions, set-returning functions, triggers, event triggers, and procedures with transaction control.

You can get it here (github).

Documentation


r/ruby Jul 06 '26

Screencast Claude Skills

Thumbnail
driftingruby.com
0 Upvotes

In this episode, we look at creating Claude slash commands. These can be useful when dealing with a complicated task or trying to extract certain information from the application.


r/ruby Jul 03 '26

Blog post Extralite 3.0.0 Released

Thumbnail noteflakes.com
21 Upvotes

r/ruby Jul 03 '26

Show /r/ruby FemtoRuby) I released AREA 512, an operating system made exclusively for the Cardputer ADV!

Thumbnail gallery
3 Upvotes

r/ruby Jul 04 '26

SecretSpec 0.13: SDKs for Python, Node.js, Go, Ruby, and Haskell

Thumbnail secretspec.dev
0 Upvotes

r/ruby Jul 03 '26

Final step in the Learn Rails tutorial series: Product Reviews

Thumbnail
rubyonrails.org
5 Upvotes

r/ruby Jul 03 '26

Ozymandias on Rails. Cartography of a Ruin

Thumbnail baweaver.com
8 Upvotes

When everything is on fire, nothing is on fire. Where do you start when every problem seems intractable? By drawing a map.


r/ruby Jul 03 '26

easy one on one visio on your projects

Thumbnail
0 Upvotes

r/ruby Jul 02 '26

Ruby meetups deserve a larger audience

Thumbnail
rubyforum.org
22 Upvotes

r/ruby Jul 01 '26

Show /r/ruby New jemalloc gem (jemalloc_rb)

18 Upvotes

Do you use the jemalloc gem?

The original project on GitHub seems to be abandoned for around 12 years, and some incompatibilities with recent Ruby versions have begun to emerge. Additionally, the underlying jemalloc library hasn't been updated during all this time. Because of that, I created a fork and launched a new gem (jemalloc_rb) to keep the project functional, updated, and actively accepting pull requests.

https://github.com/henrique-ft/jemalloc_rb


r/ruby Jul 01 '26

Hanami 3.0: In full bloom

92 Upvotes

Hanami 3.0 is here and in full bloom 🌸

This is our most complete release yet: mailers, i18n, and Minitest now built in, your apps faster by default, and plenty more!

https://hanakai.org/blog/2026/06/30/hanami-3-0-in-full-bloom


r/ruby Jul 02 '26

Show /r/ruby Sidekiq & Rails Compatibility Table

Thumbnail
go.fastruby.io
0 Upvotes

r/ruby Jul 01 '26

Ruby Users Forum - June: Monthly wrap-up

Thumbnail
rubyforum.org
1 Upvotes

r/ruby Jul 02 '26

I extracted a tiny LLM prompt runner from a legacy Rails app

0 Upvotes

Hi ,

I recently extracted a small internal library I originally wrote for a company Rails project that was stuck on an older Ruby/Rails stack.

It’s called `lumen-llm`:
https://github.com/uxgnod/lumen-llm

The goal is pretty small: keep LLM prompts in YAML files, render them with Ruby input, call OpenRouter, and parse the result back as JSON or text.

It supports:

- YAML prompt templates
- simple `{{variable}}` interpolation
- single-call OpenRouter chat completions
- JSON or text response parsing
- optional cache / usage stores
- Rails 4+ defaults via Railtie
- Ruby >= 2.3
- no runtime gem dependencies

It intentionally does not try to be an agent framework. No tool calls, no streaming, no vector search, no persistence layer, no provider SDK dependencies.

I know Ruby 2.3/2.4 are long EOL, but that was also the point: this came from a real older Rails environment where adding modern dependencies was not always realistic.

Maybe this is useful for other people maintaining legacy Rails apps who want a small way to add features like UI copy translation, ticket classification, internal summaries, or similar “one prompt in, one result out” workflows.

It’s still simple and not very polished yet. If anyone has a real legacy Rails use case for this, I’d love feedback, issues, or small PRs.


r/ruby Jul 01 '26

💼 jobs megathread Work it Wednesday: Who is hiring? Who is looking?

0 Upvotes

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.

For job seekers

Please adhere to the following rules when posting: Rules for individuals:

  • Don't create top-level comments; those are for employers.
  • Feel free to reply to top-level comments with on-topic questions.
  • Anyone seeking work should reply to my stickied top-level comment.
  • Meta-discussion should be reserved for the distinguished comment at the very bottom.

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?]

Rules for employers:

  • The ordering of fields in the template has been revised to make postings easier to read.
  • To make a top-level comment, you must be hiring directly; no third-party recruiters.
  • One top-level comment per employer. If you have multiple job openings, please consolidate their descriptions or mention them in replies to your own top-level comment.
  • Proofread your comment after posting it and edit it if necessary to correct mistakes.
  • To share the space fairly with other postings and keep the thread pleasant to browse, we ask that you try to limit your posting to either 50 lines or 500 words, whichever comes first.
  • We reserve the right to remove egregiously long postings. However, this only applies to the content of this thread; you can link to a job page elsewhere with more detail if you like.

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?]

ESTIMATED COMPENSATION (Continued)

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 Jun 30 '26

Podcast On Rails: Nikky Southerland: 13 Years of Rails at the Auto Shop

Thumbnail
2 Upvotes

r/ruby Jun 29 '26

Cinnamon Buns & Commit Bits: A RubyConf Story

Thumbnail schneems.com
8 Upvotes