# Latest

**URL:** https://discourse.dry-rb.org/latest.md

[Latest](https://discourse.dry-rb.org/latest.md) · [Categories](https://discourse.dry-rb.org/categories.md)

---

## [\[dry-cli\] Option for tab completion](https://discourse.dry-rb.org/t/dry-cli-option-for-tab-completion/1394)

<div class="topic-metadata">

**Author:** [@rngtng](https://discourse.dry-rb.org/u/rngtng)\
**Replies:** 6\
**Last updated:** [September 14, 2026, 6:05pm UTC](https://discourse.dry-rb.org/t/dry-cli-option-for-tab-completion/1394 "2026-09-14T18:05:03Z")

</div>

Hey hey are there any ideas/support for tab completion in dry-cli? Basically the exposure of a bash/zsh/\* completion script which the user has to source in their shell .\*rc on login? Thx, Cheers Tobi

---

## [Extension gems for dry-cli](https://discourse.dry-rb.org/t/extension-gems-for-dry-cli/1962)

<div class="topic-metadata">

**Author:** [@kigster](https://discourse.dry-rb.org/u/kigster)\
**Replies:** 0\
**Last updated:** [September 14, 2026, 5:56pm UTC](https://discourse.dry-rb.org/t/extension-gems-for-dry-cli/1962 "2026-09-14T17:56:24Z")

</div>

I hope this doesn’t go a against the rules of engagement, but I am hoping this might help folks using dry-cli as the backbone for their CLI applications. Having written a dozen of gems based on dry-cli (my gems are avai…

---

## [\[dry-operation\] Support current transaction for ActiveRecord extension](https://discourse.dry-rb.org/t/dry-operation-support-current-transaction-for-activerecord-extension/1961)

<div class="topic-metadata">

**Author:** [@juanfer0002](https://discourse.dry-rb.org/u/juanfer0002)\
**Replies:** 0\
**Last updated:** [August 18, 2026, 7:22pm UTC](https://discourse.dry-rb.org/t/dry-operation-support-current-transaction-for-activerecord-extension/1961 "2026-08-18T19:22:02Z")

</div>

This is my first post, so bear with me if I am missing something here. Recently, I found that I wanted to access the current transaction to a callback after commit; not a model-level but transaction-level itself. Using…

---

## [Discrimination Union](https://discourse.dry-rb.org/t/discrimination-union/1960)

<div class="topic-metadata">

**Author:** [@bibble235](https://discourse.dry-rb.org/u/bibble235)\
**Replies:** 0\
**Last updated:** [May 12, 2026, 8:05am UTC](https://discourse.dry-rb.org/t/discrimination-union/1960 "2026-05-12T08:05:35Z")

</div>

Really, really new. Just come off a typescript project and we use discrimination unio but not sure how you do this in Dry Schema. Basically the data can either be schema a or schema b based on the name. Sure in must be …

---

## [Range with member](https://discourse.dry-rb.org/t/range-with-member/1512)

<div class="topic-metadata">

**Author:** [@budu](https://discourse.dry-rb.org/u/budu)\
**Replies:** 1\
**Last updated:** [April 7, 2026, 5:11am UTC](https://discourse.dry-rb.org/t/range-with-member/1512 "2026-04-07T05:11:33Z")

</div>

Hi, I’d like to use dry-validation with date ranges and I’d like to have a range type with typed member. I’ve looked into it and started working on a PR for dry-types to add this feature. Would this be a good idea?

---

## [How do you mock ResultMatcher for a Rspec mock](https://discourse.dry-rb.org/t/how-do-you-mock-resultmatcher-for-a-rspec-mock/1955)

<div class="topic-metadata">

**Author:** [@gditrick](https://discourse.dry-rb.org/u/gditrick)\
**Replies:** 0\
**Last updated:** [January 28, 2026, 8:38pm UTC](https://discourse.dry-rb.org/t/how-do-you-mock-resultmatcher-for-a-rspec-mock/1955 "2026-01-28T20:38:06Z")

</div>

Trying to mock an unhappy path in my Rails 7.2 application so I can get full coverage on my controller/application\_controller.rb. This screenshot shows my simple coverage report of the code and the missed line and code …

---

## [Does Hash.map work in a validation schema?](https://discourse.dry-rb.org/t/does-hash-map-work-in-a-validation-schema/1948)

<div class="topic-metadata">

**Author:** [@Ashley\_E](https://discourse.dry-rb.org/u/Ashley_E)\
**Replies:** 0\
**Last updated:** [October 30, 2025, 1:28am UTC](https://discourse.dry-rb.org/t/does-hash-map-work-in-a-validation-schema/1948 "2025-10-30T01:28:35Z")

</div>

I have a schema that has an optional Hash. That Hash is always a \<string, string\> type, and the Hash can be empty. I’m trying to write a validation Contract for that. The dry-types documentation has a definition and ex…

---

## [\[dry-logger\] OpenTelemetry logging?](https://discourse.dry-rb.org/t/dry-logger-opentelemetry-logging/1943)

<div class="topic-metadata">

**Author:** [@wsmoak](https://discourse.dry-rb.org/u/wsmoak)\
**Replies:** 1\
**Last updated:** [October 5, 2025, 10:15pm UTC](https://discourse.dry-rb.org/t/dry-logger-opentelemetry-logging/1943 "2025-10-05T22:15:07Z")

</div>

I have been given a Rails application that uses dry-logger and I am tasked with sending its logs to an OpenTelemetry collector. Has anyone already done this? I’m not familiar with dry-logger but it looks like I can add…

---

## [Dry-types tuple support](https://discourse.dry-rb.org/t/dry-types-tuple-support/1942)

<div class="topic-metadata">

**Author:** [@cramt](https://discourse.dry-rb.org/u/cramt)\
**Replies:** 0\
**Last updated:** [September 29, 2025, 8:47pm UTC](https://discourse.dry-rb.org/t/dry-types-tuple-support/1942 "2025-09-29T20:47:06Z")

</div>

Currently its impossible to define a tuple type with dry-types. It has been brought up before How to declare schema with tuples of \[:string, :integer\]? . The smartest way to implement this would probably be to define a…

---

## [dry-cli customizing the help text w/headers and footers](https://discourse.dry-rb.org/t/dry-cli-customizing-the-help-text-w-headers-and-footers/1747)

<div class="topic-metadata">

**Author:** [@MadBomber](https://discourse.dry-rb.org/u/MadBomber)\
**Replies:** 1\
**Last updated:** [August 31, 2025, 6:26am UTC](https://discourse.dry-rb.org/t/dry-cli-customizing-the-help-text-w-headers-and-footers/1747 "2025-08-31T06:26:42Z")

</div>

If this is of interest to anyone else I will be happy to generate a PR.

---

## [Common lib/types constructs](https://discourse.dry-rb.org/t/common-lib-types-constructs/1937)

<div class="topic-metadata">

**Author:** [@elcuervo](https://discourse.dry-rb.org/u/elcuervo)\
**Replies:** 0\
**Last updated:** [August 28, 2025, 8:52pm UTC](https://discourse.dry-rb.org/t/common-lib-types-constructs/1937 "2025-08-28T20:52:52Z")

</div>

Personally I love dry-types and the composition it allows. Our lib/types.rb keeps growing and I wonder what kind of “common types” people build. I was even considering building a contrib package with some of those “com…

---

## [\[dry-schema\] Evolve support](https://discourse.dry-rb.org/t/dry-schema-evolve-support/1933)

<div class="topic-metadata">

**Author:** [@baweaver](https://discourse.dry-rb.org/u/baweaver)\
**Replies:** 1\
**Last updated:** [July 17, 2025, 7:59pm UTC](https://discourse.dry-rb.org/t/dry-schema-evolve-support/1933 "2025-07-17T19:59:20Z")

</div>

Currently, and understandably, dry-schema generated schemas are immutable. A use case I have is versioned schemas to where I want to do things like update, add, or remove fields and keep them semantically locked, and whi…

---

## [\[dry-operation\] Passing data between steps](https://discourse.dry-rb.org/t/dry-operation-passing-data-between-steps/1931)

<div class="topic-metadata">

**Author:** [@marco](https://discourse.dry-rb.org/u/marco)\
**Replies:** 1\
**Last updated:** [July 7, 2025, 9:12pm UTC](https://discourse.dry-rb.org/t/dry-operation-passing-data-between-steps/1931 "2025-07-07T21:12:43Z")

</div>

Hi folks, I am working on a proof-of-concept, exploring how we would use dry-operation to refactor some complex business logic. In our application, operations are complex and operate on many record types, many of which…

---

## [\[dry-core\] ClassBuilder peculiarity](https://discourse.dry-rb.org/t/dry-core-classbuilder-peculiarity/1929)

<div class="topic-metadata">

**Author:** [@pointlessone](https://discourse.dry-rb.org/u/pointlessone)\
**Replies:** 4\
**Last updated:** [July 1, 2025, 3:05pm UTC](https://discourse.dry-rb.org/t/dry-core-classbuilder-peculiarity/1929 "2025-07-01T15:05:09Z")

</div>

I was reading the docs and spotted something odd about ClassBuilder. Here’s the example: builder = Dry::Core::ClassBuilder.new(name: 'User', namespace: Entities) klass = builder.call klass.name # =\> "Entities::User" kl…

---

## [Fail to autoload my dependencies with dry-system](https://discourse.dry-rb.org/t/fail-to-autoload-my-dependencies-with-dry-system/1926)

<div class="topic-metadata">

**Author:** [@ericto](https://discourse.dry-rb.org/u/ericto)\
**Replies:** 7\
**Last updated:** [June 23, 2025, 1:52pm UTC](https://discourse.dry-rb.org/t/fail-to-autoload-my-dependencies-with-dry-system/1926 "2025-06-23T13:52:22Z")

</div>

Hello I’m facing an issue to register my dependencies with dry-system and dry-container I’m using dry-container (0.10.0) dry-system (0.27.2) with this code snippet: require 'dry-auto\_inject' di\_container = Dry::Co…

---

## [Consume JSONSchema to initialize dry-schema?](https://discourse.dry-rb.org/t/consume-jsonschema-to-initialize-dry-schema/1920)

<div class="topic-metadata">

**Author:** [@jelder](https://discourse.dry-rb.org/u/jelder)\
**Replies:** 1\
**Last updated:** [May 15, 2025, 2:35pm UTC](https://discourse.dry-rb.org/t/consume-jsonschema-to-initialize-dry-schema/1920 "2025-05-15T14:35:07Z")

</div>

Is there any way to get started with dry-schema by importing a JSONSchema document? I’m building features in Ruby on top of a Go backend. The API publishes a Swagger (OpenAPI) document. We’ve had success using Kubb to g…

---

## [Is lazy evaluation of enumerations possible?](https://discourse.dry-rb.org/t/is-lazy-evaluation-of-enumerations-possible/1879)

<div class="topic-metadata">

**Author:** [@hovsater](https://discourse.dry-rb.org/u/hovsater)\
**Replies:** 1\
**Last updated:** [April 5, 2025, 4:05pm UTC](https://discourse.dry-rb.org/t/is-lazy-evaluation-of-enumerations-possible/1879 "2025-04-05T16:05:42Z")

</div>

We have a use case at work where we need to lazy evaluate the enumeration values for our type. Given this: class RelationsResponse \< Entity RelationType = Types::String.enum(\*Site.current.relation\_types) attribute …

---

## [\[dry-operation\] on\_failure handler's first argument](https://discourse.dry-rb.org/t/dry-operation-on-failure-handlers-first-argument/1913)

<div class="topic-metadata">

**Author:** [@buszu](https://discourse.dry-rb.org/u/buszu)\
**Replies:** 5\
**Last updated:** [March 25, 2025, 5:42pm UTC](https://discourse.dry-rb.org/t/dry-operation-on-failure-handlers-first-argument/1913 "2025-03-25T17:42:04Z")

</div>

Hello, I’m trying to implement #on\_failure handler for my operation and I was expecting the first argument to be a monad, instead I’m getting unwrapped result passed to Failure. def on\_failure(failure, step\_name) @fai…

---

## [Getting ProviderNotFoundError when provider isn't directly in container.rb](https://discourse.dry-rb.org/t/getting-providernotfounderror-when-provider-isnt-directly-in-container-rb/1904)

<div class="topic-metadata">

**Author:** [@stor314](https://discourse.dry-rb.org/u/stor314)\
**Replies:** 1\
**Last updated:** [March 3, 2025, 5:24pm UTC](https://discourse.dry-rb.org/t/getting-providernotfounderror-when-provider-isnt-directly-in-container-rb/1904 "2025-03-03T17:24:45Z")

</div>

Hi, I’m trying to configure providers for some api clients that I have. I’ve been following the example provided in the documentation for dry-system, but I keep running into issues trying to get them to be in their own …

---

## [Is dry-operation replacing dry-transaction?](https://discourse.dry-rb.org/t/is-dry-operation-replacing-dry-transaction/1742)

<div class="topic-metadata">

**Author:** [@jpf](https://discourse.dry-rb.org/u/jpf)\
**Replies:** 5\
**Last updated:** [March 3, 2025, 3:19am UTC](https://discourse.dry-rb.org/t/is-dry-operation-replacing-dry-transaction/1742 "2025-03-03T03:19:09Z")

</div>

I was looking into using dry-transaction and came across dry-operation, which is new and seems to be solving the same problem. Am I wrong about that or is dry-transaction going to be deprecated?

---

## [Extending \`Array.of\` behaviour to \`Set\`, \`Range\` etc](https://discourse.dry-rb.org/t/extending-array-of-behaviour-to-set-range-etc/1896)

<div class="topic-metadata">

**Author:** [@doriantaylor](https://discourse.dry-rb.org/u/doriantaylor)\
**Replies:** 2\
**Last updated:** [February 19, 2025, 2:23pm UTC](https://discourse.dry-rb.org/t/extending-array-of-behaviour-to-set-range-etc/1896 "2025-02-19T14:23:23Z")

</div>

I am in a situation where I have container types other than Array, and want to be able to specify a member type. I’m not sure how, or even if I can just extend the existing code to do this. Specifically, I’m looking to …

---

## [Transform a Dry::Struct into a JSON structure](https://discourse.dry-rb.org/t/transform-a-dry-struct-into-a-json-structure/1892)

<div class="topic-metadata">

**Author:** [@andrepcg](https://discourse.dry-rb.org/u/andrepcg)\
**Replies:** 1\
**Last updated:** [February 17, 2025, 8:39pm UTC](https://discourse.dry-rb.org/t/transform-a-dry-struct-into-a-json-structure/1892 "2025-02-17T20:39:58Z")

</div>

Imagine we have this Struct class Test \< Dry::Struct attribute :resource\_type, Dry.Types::String attribute :things, Dry.Types::Array do attribute :name, Dry.Types::String end attribute :other\_things, Dry.Typ…

---

## [ROM-rb with graphql pagination](https://discourse.dry-rb.org/t/rom-rb-with-graphql-pagination/1888)

<div class="topic-metadata">

**Author:** [@krisleech](https://discourse.dry-rb.org/u/krisleech)\
**Replies:** 0\
**Last updated:** [February 6, 2025, 4:29pm UTC](https://discourse.dry-rb.org/t/rom-rb-with-graphql-pagination/1888 "2025-02-06T16:29:17Z")

</div>

Does anyone know if ROM-rb can work with graphql gem in terms of cursor based pagination? It seems to work with ActiveRecord by default. Cheers.

---

## [\[dry-schema\] Key annotations](https://discourse.dry-rb.org/t/dry-schema-key-annotations/1544)

<div class="topic-metadata">

**Author:** [@mehanoid](https://discourse.dry-rb.org/u/mehanoid)\
**Replies:** 5\
**Last updated:** [February 5, 2025, 10:53pm UTC](https://discourse.dry-rb.org/t/dry-schema-key-annotations/1544 "2025-02-05T22:53:19Z")

</div>

It would be very cool if it were possible to add annotations to keys, which can then be used to generate documentation. Proposed syntax: ProductSchema = Dry::Schema.JSON do required(:name).filled(:string) …

---

## [How to define a schema for hashes with non Symbol/String keys](https://discourse.dry-rb.org/t/how-to-define-a-schema-for-hashes-with-non-symbol-string-keys/1659)

<div class="topic-metadata">

**Author:** [@delonnewman](https://discourse.dry-rb.org/u/delonnewman)\
**Replies:** 4\
**Last updated:** [December 18, 2024, 1:59am UTC](https://discourse.dry-rb.org/t/how-to-define-a-schema-for-hashes-with-non-symbol-string-keys/1659 "2024-12-18T01:59:59Z")

</div>

I’m trying to validate the following shape: { tag: :locations, paths: { \[%w\[in near\], %w\[me us\]\] =\> { current\_location: true, tag: 'Location' }, \[%w\[in near\], %w\[my our\], %w\[area town community city island s…

---

## [How to translate following transformation into the dry-transformer DSL?](https://discourse.dry-rb.org/t/how-to-translate-following-transformation-into-the-dry-transformer-dsl/1624)

<div class="topic-metadata">

**Author:** [@wuarmin](https://discourse.dry-rb.org/u/wuarmin)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 8:51am UTC](https://discourse.dry-rb.org/t/how-to-translate-following-transformation-into-the-dry-transformer-dsl/1624 "2024-11-25T08:51:02Z")

</div>

Hey, I can’t figure out how to translate the following transformation into the dry-transformer DSL. Dry::Transformer::Recursion.t( :recursion, Dry::Transformer::Conditional.t( :is, ::Hash, Dry::Transformer:…

---

## [How to disable key validation for a hash prop](https://discourse.dry-rb.org/t/how-to-disable-key-validation-for-a-hash-prop/1860)

<div class="topic-metadata">

**Author:** [@diegocolombo](https://discourse.dry-rb.org/u/diegocolombo)\
**Replies:** 3\
**Last updated:** [November 19, 2024, 6:37pm UTC](https://discourse.dry-rb.org/t/how-to-disable-key-validation-for-a-hash-prop/1860 "2024-11-19T18:37:09Z")

</div>

In my RoR app, I’ve declared a initializer to define validate\_key Dry::Schema.config.validate\_keys = true Let’s say I’ve got the following schema schema = Dry::Schema.Json do optional(:foo).maybe(:hash) end I wan’t…

---

## [Any chance a dry-logic release could be cut?](https://discourse.dry-rb.org/t/any-chance-a-dry-logic-release-could-be-cut/1862)

<div class="topic-metadata">

**Author:** [@compactcode](https://discourse.dry-rb.org/u/compactcode)\
**Replies:** 0\
**Last updated:** [November 19, 2024, 12:13am UTC](https://discourse.dry-rb.org/t/any-chance-a-dry-logic-release-could-be-cut/1862 "2024-11-19T00:13:58Z")

</div>

I’ve started using UUIDv7 and would love to be able to use the new predicates added a year ago without extra hoops. Any reason these weren’t released? Thanks

---

## [What's the status of dry-operation? How production-ready is it?](https://discourse.dry-rb.org/t/whats-the-status-of-dry-operation-how-production-ready-is-it/1858)

<div class="topic-metadata">

**Author:** [@phaedryx](https://discourse.dry-rb.org/u/phaedryx)\
**Replies:** 1\
**Last updated:** [November 18, 2024, 7:53pm UTC](https://discourse.dry-rb.org/t/whats-the-status-of-dry-operation-how-production-ready-is-it/1858 "2024-11-18T19:53:01Z")

</div>

It looks like it is a replacement for dry-trainsaction?

---

## [Ruby upgrade causing dry-container failuers](https://discourse.dry-rb.org/t/ruby-upgrade-causing-dry-container-failuers/1798)

<div class="topic-metadata">

**Author:** [@Gus](https://discourse.dry-rb.org/u/Gus)\
**Replies:** 2\
**Last updated:** [November 3, 2024, 10:15pm UTC](https://discourse.dry-rb.org/t/ruby-upgrade-causing-dry-container-failuers/1798 "2024-11-03T22:15:53Z")

</div>

Hello I am in the process of upgrading Ruby for our app from 2.5.1 to 3.3.0. We have the following code which was working in 2.5.1: require "dry-container" require "dry-auto\_inject" module Dealer class Container …

[Next page](https://discourse.dry-rb.org/latest.md?page=1)
