# Uncategorized

**URL:** https://discourse.dry-rb.org/c/uncategorized/1.md

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

---

## [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 …

---

## [\[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…

---

## [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…

---

## [\[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…

---

## [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?

---

## [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?

---

## [NameError: uninitialized constant Dry::Validation::Contract::ClassInterface when using binding.pry inside spec examples](https://discourse.dry-rb.org/t/nameerror-uninitialized-constant-dry-classinterface-when-using-binding-pry-inside-spec-examples/1646)

<div class="topic-metadata">

**Author:** [@barmic](https://discourse.dry-rb.org/u/barmic)\
**Replies:** 2\
**Last updated:** [October 7, 2024, 12:57pm UTC](https://discourse.dry-rb.org/t/nameerror-uninitialized-constant-dry-classinterface-when-using-binding-pry-inside-spec-examples/1646 "2024-10-07T12:57:40Z")

</div>

Hello, in the project I use dry-validation gem. When I use binding.pry inside rspec examples and call the subject: subject(:update\_store) { described\_class.new(partner.user, params).call } .... it "creates 2 opening…

---

## [dry-validation, custom field name](https://discourse.dry-rb.org/t/dry-validation-custom-field-name/1847)

<div class="topic-metadata">

**Author:** [@radar](https://discourse.dry-rb.org/u/radar)\
**Replies:** 0\
**Last updated:** [September 28, 2024, 10:52pm UTC](https://discourse.dry-rb.org/t/dry-validation-custom-field-name/1847 "2024-09-28T22:52:35Z")

</div>

I’m trying to output a custom field name for a validation: require 'bundler/inline' gemfile do source 'https://rubygems.org' gem 'dry-validation' end require 'dry-validation' class RowValidator \< Dry::Validation:…

---

## [Storing user created dry-schema in a database](https://discourse.dry-rb.org/t/storing-user-created-dry-schema-in-a-database/1838)

<div class="topic-metadata">

**Author:** [@sled](https://discourse.dry-rb.org/u/sled)\
**Replies:** 1\
**Last updated:** [August 22, 2024, 6:19pm UTC](https://discourse.dry-rb.org/t/storing-user-created-dry-schema-in-a-database/1838 "2024-08-22T18:19:13Z")

</div>

I’m working on a web application that let’s the user define input / output data structures through an user interface. Now I’m wondering if I could leverage dry-schema in the background and build “anonymous” schema defi…

---

## [Why was dry-transaction deprecated?](https://discourse.dry-rb.org/t/why-was-dry-transaction-deprecated/1822)

<div class="topic-metadata">

**Author:** [@wilsonsilva](https://discourse.dry-rb.org/u/wilsonsilva)\
**Replies:** 4\
**Last updated:** [August 12, 2024, 7:42pm UTC](https://discourse.dry-rb.org/t/why-was-dry-transaction-deprecated/1822 "2024-08-12T19:42:03Z")

</div>

I remember reading why dry-transaction was deprecated a few years ago, but now I can’t find that page. I would also love to know what makes dry-operation a good replacement.

---

## [Can dry-rb ecosystem be considered for implementing a simple DSL for deployment automation?](https://discourse.dry-rb.org/t/can-dry-rb-ecosystem-be-considered-for-implementing-a-simple-dsl-for-deployment-automation/1820)

<div class="topic-metadata">

**Author:** [@jignesh](https://discourse.dry-rb.org/u/jignesh)\
**Replies:** 2\
**Last updated:** [August 9, 2024, 6:23pm UTC](https://discourse.dry-rb.org/t/can-dry-rb-ecosystem-be-considered-for-implementing-a-simple-dsl-for-deployment-automation/1820 "2024-08-09T18:23:45Z")

</div>

In Ruby ecosystem the most popular deployment automation tool is Capistrano. Recently I came across a promising alternative GitHub - mattbrictson/tomo: A friendly CLI for deploying Rails apps ✨. I really liked the simpli…

---

## [Best practices for using Dry-Types, Dry-Schema, Dry-Validation, and Dry-Struct together in our apps](https://discourse.dry-rb.org/t/best-practices-for-using-dry-types-dry-schema-dry-validation-and-dry-struct-together-in-our-apps/1821)

<div class="topic-metadata">

**Author:** [@Damian](https://discourse.dry-rb.org/u/Damian)\
**Replies:** 1\
**Last updated:** [August 7, 2024, 3:00am UTC](https://discourse.dry-rb.org/t/best-practices-for-using-dry-types-dry-schema-dry-validation-and-dry-struct-together-in-our-apps/1821 "2024-08-07T03:00:19Z")

</div>

I am exploring app development with Hanami 2, which has led me to dive into the Dry-rb ecosystem as well. Loving it so far! :heart: I am having some trouble understanding how to coordinate my usage of the various Dry-rb…

---

## [\[Dry-Schema\] TS Generation?](https://discourse.dry-rb.org/t/dry-schema-ts-generation/1818)

<div class="topic-metadata">

**Author:** [@emilsosa](https://discourse.dry-rb.org/u/emilsosa)\
**Replies:** 0\
**Last updated:** [July 29, 2024, 2:11am UTC](https://discourse.dry-rb.org/t/dry-schema-ts-generation/1818 "2024-07-29T02:11:02Z")

</div>

I’m new to the dry ecosystem, but it is pretty cool. :slight\_smile: I’m wondering if there is any gem that will analyze dry-schemas and generate Typescript from it?

---

## [dry-logger API compatible with Ruby logger?](https://discourse.dry-rb.org/t/dry-logger-api-compatible-with-ruby-logger/1590)

<div class="topic-metadata">

**Author:** [@masterT](https://discourse.dry-rb.org/u/masterT)\
**Replies:** 3\
**Last updated:** [May 14, 2024, 5:10pm UTC](https://discourse.dry-rb.org/t/dry-logger-api-compatible-with-ruby-logger/1590 "2024-05-14T17:10:06Z")

</div>

It would be helpful if the dry-logger API would be compatible with the standard Ruby Logger API so that it can be used in other libraries. I think the only thing missing is to support block passed to the logging methods…

---

## [Detect a type in a struct is a built-in type vs. custom type](https://discourse.dry-rb.org/t/detect-a-type-in-a-struct-is-a-built-in-type-vs-custom-type/1779)

<div class="topic-metadata">

**Author:** [@gap777](https://discourse.dry-rb.org/u/gap777)\
**Replies:** 1\
**Last updated:** [February 21, 2024, 6:33pm UTC](https://discourse.dry-rb.org/t/detect-a-type-in-a-struct-is-a-built-in-type-vs-custom-type/1779 "2024-02-21T18:33:01Z")

</div>

Hi, Is there some way for me to analyze a given struct, and select the attributes in it that are NOT corresponding to built-in types? (dry-rb - dry-types v1.7 - Built-in Types)

---

## [Composing schemas with ^ (xor)](https://discourse.dry-rb.org/t/composing-schemas-with-xor/1760)

<div class="topic-metadata">

**Author:** [@cpgo](https://discourse.dry-rb.org/u/cpgo)\
**Replies:** 1\
**Last updated:** [January 2, 2024, 5:21am UTC](https://discourse.dry-rb.org/t/composing-schemas-with-xor/1760 "2024-01-02T05:21:31Z")

</div>

According to the dry-schema documentation xor is not supported in schema compositions Currently \`^\` (\`xor\`) is not supported because it's not yet clear how to generate errors messages in this case Is this not implement…

---

## [Custom predicated in Dry::Struct](https://discourse.dry-rb.org/t/custom-predicated-in-dry-struct/1713)

<div class="topic-metadata">

**Author:** [@stoivo](https://discourse.dry-rb.org/u/stoivo)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 1:24pm UTC](https://discourse.dry-rb.org/t/custom-predicated-in-dry-struct/1713 "2023-11-24T13:24:15Z")

</div>

Hi, I am working on a tool to create dry struct from an xsd. The xsd has some constraints I would like to mimic. This isn’t it but I simplified the version. Ideally I wanted to add some options to constrained. I looked …

---

## [Doc site out-of-date](https://discourse.dry-rb.org/t/doc-site-out-of-date/1666)

<div class="topic-metadata">

**Author:** [@paul](https://discourse.dry-rb.org/u/paul)\
**Replies:** 2\
**Last updated:** [May 12, 2023, 7:24am UTC](https://discourse.dry-rb.org/t/doc-site-out-of-date/1666 "2023-05-12T07:24:36Z")

</div>

I’ve noticed several gems on the documentation site don’t have the latest versions. For example, dry-validation is at 1.10, but on docs its only 1.8. Similar for dry-transaction, 0.13 vs 0.15. Does someone need to poke …

---

## [Initial impressions feedback after using dry-types, dry-schema, dry-validation in a new Sinatra app](https://discourse.dry-rb.org/t/initial-impressions-feedback-after-using-dry-types-dry-schema-dry-validation-in-a-new-sinatra-app/1638)

<div class="topic-metadata">

**Author:** [@postmodern](https://discourse.dry-rb.org/u/postmodern)\
**Replies:** 3\
**Last updated:** [May 10, 2023, 10:50am UTC](https://discourse.dry-rb.org/t/initial-impressions-feedback-after-using-dry-types-dry-schema-dry-validation-in-a-new-sinatra-app/1638 "2023-05-10T10:50:28Z")

</div>

Hello, I recently used some of the dry-rb gems in a small Sinatra app for form input validation and JSON Hash coercion for Sidekiq workers. Here is some feedback based on my experience setting up the gems and navigating …

---

## [A catch with \`Dry::Monads::Do\` and transaction safety](https://discourse.dry-rb.org/t/a-catch-with-dry-do-and-transaction-safety/1647)

<div class="topic-metadata">

**Author:** [@mjhoy](https://discourse.dry-rb.org/u/mjhoy)\
**Replies:** 3\
**Last updated:** [April 10, 2023, 8:28am UTC](https://discourse.dry-rb.org/t/a-catch-with-dry-do-and-transaction-safety/1647 "2023-04-10T08:28:42Z")

</div>

Hello, One thing I’ve run into with Dry::Monads::Do is that there’s a subtle catch in relying on the exceptions thrown for transaction safety. The following two methods are not equivalent: def safe transaction do …

---

## [dry-effect and exceptions (truncated stacktrace)](https://discourse.dry-rb.org/t/dry-effect-and-exceptions-truncated-stacktrace/1611)

<div class="topic-metadata">

**Author:** [@DangerDawson](https://discourse.dry-rb.org/u/DangerDawson)\
**Replies:** 1\
**Last updated:** [February 13, 2023, 7:42am UTC](https://discourse.dry-rb.org/t/dry-effect-and-exceptions-truncated-stacktrace/1611 "2023-02-13T07:42:04Z")

</div>

Hi, I am using a dry-effect in my controller (hanami) to provide a Reader which is used to provide scoping information to the repositories e.g. organisation\_id. I have noticed that when an exception is thrown, my stack…

---

## [undefined method error for my schema](https://discourse.dry-rb.org/t/undefined-method-error-for-my-schema/1593)

<div class="topic-metadata">

**Author:** [@jedrekdomanski](https://discourse.dry-rb.org/u/jedrekdomanski)\
**Replies:** 11\
**Last updated:** [January 12, 2023, 10:29am UTC](https://discourse.dry-rb.org/t/undefined-method-error-for-my-schema/1593 "2023-01-12T10:29:55Z")

</div>

Hello, I am reaching out because I feel confused by the documentation of dry-schema. I do as the docs say but I get errors and I’m stuck. My case is to have apikey key in all schemas and some required and optional keys…

---

## [How can I perform custom validation without monkeypatching?](https://discourse.dry-rb.org/t/how-can-i-perform-custom-validation-without-monkeypatching/1568)

<div class="topic-metadata">

**Author:** [@johngallagherbp](https://discourse.dry-rb.org/u/johngallagherbp)\
**Replies:** 2\
**Last updated:** [December 15, 2022, 10:39am UTC](https://discourse.dry-rb.org/t/how-can-i-perform-custom-validation-without-monkeypatching/1568 "2022-12-15T10:39:16Z")

</div>

Hello! Thanks for an awesome set of libraries. The problem I want to make sure the object I’m building isn’t broken. It should either have both :text and :path\_name as being filled OR neither key should be present. M…

---

## [Why interfaces of dry-struct and dry-initializer are different?](https://discourse.dry-rb.org/t/why-interfaces-of-dry-struct-and-dry-initializer-are-different/1554)

<div class="topic-metadata">

**Author:** [@greenfork](https://discourse.dry-rb.org/u/greenfork)\
**Replies:** 6\
**Last updated:** [November 16, 2022, 2:13pm UTC](https://discourse.dry-rb.org/t/why-interfaces-of-dry-struct-and-dry-initializer-are-different/1554 "2022-11-16T14:13:54Z")

</div>

Is there a reason why these two libraries have a very similar interface but not identical? dry-struct: class User \< Dry::Struct attribute :name, Types::String.optional attribute :age, Types::Coercible::Integer end …

---

## [\[Dry-Core\] extensions provided by the user](https://discourse.dry-rb.org/t/dry-core-extensions-provided-by-the-user/1486)

<div class="topic-metadata">

**Author:** [@alex-lairan](https://discourse.dry-rb.org/u/alex-lairan)\
**Replies:** 1\
**Last updated:** [July 26, 2022, 5:32am UTC](https://discourse.dry-rb.org/t/dry-core-extensions-provided-by-the-user/1486 "2022-07-26T05:32:43Z")

</div>

Hi, I wanna know if it’s possible for users to provide their own extensions. I’m building a flexible library and I want to be very open to extensions. Something like Foo.load\_extension(PerformanceDashboard) Foo.new.…

---

## [Annoying YARD problem with dry-struct ‘new’](https://discourse.dry-rb.org/t/annoying-yard-problem-with-dry-struct-new/1479)

<div class="topic-metadata">

**Author:** [@nuzz](https://discourse.dry-rb.org/u/nuzz)\
**Replies:** 0\
**Last updated:** [June 12, 2022, 10:16pm UTC](https://discourse.dry-rb.org/t/annoying-yard-problem-with-dry-struct-new/1479 "2022-06-12T22:16:08Z")

</div>

Foo.new(…) returns type Foo but RubyMine thinks that it is of type Hash{Symbol-\>Object}. Is there a better workaround than adding multiple lines of boilerplate for each and every class? We’re only able to use Ruby 3.0 a…

---

## [Caching data per call with command pattern](https://discourse.dry-rb.org/t/caching-data-per-call-with-command-pattern/1248)

<div class="topic-metadata">

**Author:** [@isikyus](https://discourse.dry-rb.org/u/isikyus)\
**Replies:** 2\
**Last updated:** [March 25, 2022, 5:45am UTC](https://discourse.dry-rb.org/t/caching-data-per-call-with-command-pattern/1248 "2022-03-25T05:45:29Z")

</div>

We’ve got a lot of classes following this general command pattern: class SomeCommand import \['subcommand\_a', 'subcommand\_b'\] def call(args) dependency\_a.(...) # ... processing specific to this command ... …

---

## [RailsConf 2022 - Portland, OR, USA - BoF or Meetup?](https://discourse.dry-rb.org/t/railsconf-2022-portland-or-usa-bof-or-meetup/1443)

<div class="topic-metadata">

**Author:** [@jedschneider](https://discourse.dry-rb.org/u/jedschneider)\
**Replies:** 0\
**Last updated:** [March 16, 2022, 3:20pm UTC](https://discourse.dry-rb.org/t/railsconf-2022-portland-or-usa-bof-or-meetup/1443 "2022-03-16T15:20:20Z")

</div>

Hi Folks, I haven’t officially registered for RailsConf (and may not), but I’m curious if other folks in the dry-rb and/or rom-rb community would like to connect. I’m local to Portland so it would be easy(er) for me to c…

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