# Support

**URL:** https://discourse.dry-rb.org/c/support/9.md

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

---

## [About the Support category](https://discourse.dry-rb.org/t/about-the-support-category/26)

<div class="topic-metadata">

**Author:** [@solnic](https://discourse.dry-rb.org/u/solnic)\
**Replies:** 0

</div>

Got any trouble using some of the dry-rb gems? Ask questions here. Notice that we have separate sub-categories for dry-validation, dry-types and dry-web.

---

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

---

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

---

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

---

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

---

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

---

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

---

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

---

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

---

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

---

## [Stubbing not working at all with dry-rails](https://discourse.dry-rb.org/t/stubbing-not-working-at-all-with-dry-rails/1850)

<div class="topic-metadata">

**Author:** [@sdhull](https://discourse.dry-rb.org/u/sdhull)\
**Replies:** 2\
**Last updated:** [October 18, 2024, 5:11pm UTC](https://discourse.dry-rb.org/t/stubbing-not-working-at-all-with-dry-rails/1850 "2024-10-18T17:11:14Z")

</div>

We’re on dry-rails 0.7.0 and I tried adding require "dry/container/stub" MyApp::Container.enable\_stubs! To our rails\_helper and I just get a NoMethodError: Failure/Error: MyApp::Container.enable\_stubs! NoMethodError…

---

## [dry-validation: validate\_keys for nested array](https://discourse.dry-rb.org/t/dry-validation-validate-keys-for-nested-array/1852)

<div class="topic-metadata">

**Author:** [@dmke](https://discourse.dry-rb.org/u/dmke)\
**Replies:** 1\
**Last updated:** [October 17, 2024, 1:17pm UTC](https://discourse.dry-rb.org/t/dry-validation-validate-keys-for-nested-array/1852 "2024-10-17T13:17:19Z")

</div>

I’m trying to catch unexpected keys in my (Rails-) API, using the following (simplified) code: require "dry-validation" class C \< Dry::Validation::Contract config.validate\_keys = true params do required(:name)…

---

## [Run dry-cli script in other ruby projects](https://discourse.dry-rb.org/t/run-dry-cli-script-in-other-ruby-projects/1804)

<div class="topic-metadata">

**Author:** [@adrianthedev](https://discourse.dry-rb.org/u/adrianthedev)\
**Replies:** 5\
**Last updated:** [September 3, 2024, 12:06am UTC](https://discourse.dry-rb.org/t/run-dry-cli-script-in-other-ruby-projects/1804 "2024-09-03T00:06:03Z")

</div>

I have this cli built with dry-cli and a couple of other gems. The way I’d like to run it is to keep it in my current directory (the repo where I’m working on it) and be able to run it globally on my machine What I did…

---

## [JSON Schema support for excluded\_from? and eql?](https://discourse.dry-rb.org/t/json-schema-support-for-excluded-from-and-eql/1841)

<div class="topic-metadata">

**Author:** [@mannerheim77](https://discourse.dry-rb.org/u/mannerheim77)\
**Replies:** 0\
**Last updated:** [August 26, 2024, 8:58pm UTC](https://discourse.dry-rb.org/t/json-schema-support-for-excluded-from-and-eql/1841 "2024-08-26T20:58:22Z")

</div>

Curious why excluded\_from? and eql? aren’t supported as mappings in schema\_compiler.rb? Figured eql? could just map to enum with a single value, right? And excluded\_from? could be mapped to {not: {enum: -\>(v, \_) { v.to…

---

## [Make included\_in constrain dynamic](https://discourse.dry-rb.org/t/make-included-in-constrain-dynamic/1834)

<div class="topic-metadata">

**Author:** [@milushov](https://discourse.dry-rb.org/u/milushov)\
**Replies:** 5\
**Last updated:** [August 14, 2024, 12:19pm UTC](https://discourse.dry-rb.org/t/make-included-in-constrain-dynamic/1834 "2024-08-14T12:19:20Z")

</div>

Hello everyone, I’m currently using dry-types version 1.7.2 in a large project, and I need to update a custom type to work with a dynamic list for the included\_in constraint without breaking existing tests. Previously,…

---

## [Default values and #try](https://discourse.dry-rb.org/t/default-values-and-try/1817)

<div class="topic-metadata">

**Author:** [@elcuervo](https://discourse.dry-rb.org/u/elcuervo)\
**Replies:** 3\
**Last updated:** [July 24, 2024, 7:41pm UTC](https://discourse.dry-rb.org/t/default-values-and-try/1817 "2024-07-24T19:41:19Z")

</div>

EDIT: As correctly pointed by @alassek this is related to a known issue with #try and Default I was expecting to be able to use to\_monad on a type with default values. Is this an expected behavior or am I missing somet…

---

## [Injecting dynamic values for a specific schema to validate against](https://discourse.dry-rb.org/t/injecting-dynamic-values-for-a-specific-schema-to-validate-against/1815)

<div class="topic-metadata">

**Author:** [@flexaddicted](https://discourse.dry-rb.org/u/flexaddicted)\
**Replies:** 0\
**Last updated:** [July 19, 2024, 9:37am UTC](https://discourse.dry-rb.org/t/injecting-dynamic-values-for-a-specific-schema-to-validate-against/1815 "2024-07-19T09:37:23Z")

</div>

Hello, I have the following yaml file that I would like to validate using dry-rb. --- environment: # required test: # should be dynamic service\_credentials: "test\_credentials" # required stage: service\_cred…

---

## [XOR operation/type](https://discourse.dry-rb.org/t/xor-operation-type/1812)

<div class="topic-metadata">

**Author:** [@elcuervo](https://discourse.dry-rb.org/u/elcuervo)\
**Replies:** 0\
**Last updated:** [July 11, 2024, 6:19pm UTC](https://discourse.dry-rb.org/t/xor-operation-type/1812 "2024-07-11T18:19:34Z")

</div>

I’ve been fiddling around with ideas trying to find how would a xor type would look like. I wonder if there’s been any conversation for a ^ operator between types. So far, and just for fun I have this as a naive idea: …

---

## [\[Dry-Struct\] How to create a nested struct in an optional array?](https://discourse.dry-rb.org/t/dry-struct-how-to-create-a-nested-struct-in-an-optional-array/1810)

<div class="topic-metadata">

**Author:** [@BonMatts](https://discourse.dry-rb.org/u/BonMatts)\
**Replies:** 3\
**Last updated:** [July 10, 2024, 10:08pm UTC](https://discourse.dry-rb.org/t/dry-struct-how-to-create-a-nested-struct-in-an-optional-array/1810 "2024-07-10T22:08:35Z")

</div>

I’m trying to create an attrbute that is an optional array with a nested struct. I’ve tried attribute :someArray, Types::Array.of( Dry::Schema.optional do attribute :someString, Types::String attribute :someInteger, …

---

## [Types code organization](https://discourse.dry-rb.org/t/types-code-organization/1808)

<div class="topic-metadata">

**Author:** [@elcuervo](https://discourse.dry-rb.org/u/elcuervo)\
**Replies:** 2\
**Last updated:** [July 10, 2024, 7:59pm UTC](https://discourse.dry-rb.org/t/types-code-organization/1808 "2024-07-10T19:59:48Z")

</div>

I’m heavily pushing dry-types where I work because I feel that is providing a lot of value understanding the data structures we handle. Now I’ve been going back and forward on how to organize the types in a clean way tr…

---

## [Schema composition](https://discourse.dry-rb.org/t/schema-composition/1806)

<div class="topic-metadata">

**Author:** [@beechnut](https://discourse.dry-rb.org/u/beechnut)\
**Replies:** 3\
**Last updated:** [July 10, 2024, 7:30pm UTC](https://discourse.dry-rb.org/t/schema-composition/1806 "2024-07-10T19:30:12Z")

</div>

Hi dry-rb community! Forgive me if I’m asking a repeat question, but I’ve searched issues and forums and tried quite a bit of experimentation, but I’m still not able to solve my issue. I’m using dry-schema / dry-validat…

---

## [Access default value in the type AST](https://discourse.dry-rb.org/t/access-default-value-in-the-type-ast/1789)

<div class="topic-metadata">

**Author:** [@elcuervo](https://discourse.dry-rb.org/u/elcuervo)\
**Replies:** 2\
**Last updated:** [July 5, 2024, 2:07pm UTC](https://discourse.dry-rb.org/t/access-default-value-in-the-type-ast/1789 "2024-07-05T14:07:02Z")

</div>

Hello! I wonder if there’s a way to access the default value of a type while parsing the AST. I’m building a gem to translate types into other structures and having the default value would help. Types::String.default(…

---

## [Using boolean-like predicates as constraints in dry-types](https://discourse.dry-rb.org/t/using-boolean-like-predicates-as-constraints-in-dry-types/1807)

<div class="topic-metadata">

**Author:** [@Damian](https://discourse.dry-rb.org/u/Damian)\
**Replies:** 2\
**Last updated:** [July 3, 2024, 6:19pm UTC](https://discourse.dry-rb.org/t/using-boolean-like-predicates-as-constraints-in-dry-types/1807 "2024-07-03T18:19:40Z")

</div>

When specifying a schema using dry-validations, I can do something like this to check for a particular type of UUID: required(:uuid).value(:string, :uuid\_v4?) This is invoking the uuid\_v4? predicate provided by dry-log…

---

## [specify initialize method dry-initializer](https://discourse.dry-rb.org/t/specify-initialize-method-dry-initializer/1802)

<div class="topic-metadata">

**Author:** [@scottbarrow](https://discourse.dry-rb.org/u/scottbarrow)\
**Replies:** 0\
**Last updated:** [May 29, 2024, 9:25pm UTC](https://discourse.dry-rb.org/t/specify-initialize-method-dry-initializer/1802 "2024-05-29T21:25:20Z")

</div>

Is there a way to define the name of the initialize method that dry-initializer interacts with. E.g. for use with Classes that have wrappers around constructors such as ActiveJobs, Sidekiq jobs, #perform method

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