# questions

**URL:** https://discourse.hanakai.org/c/questions/9.md

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

---

## [About the questions category](https://discourse.hanakai.org/t/about-the-questions-category/46)

<div class="topic-metadata">

**Author:** [@trung\_le](https://discourse.hanakai.org/u/trung_le)\
**Replies:** 0

</div>

Bring your Hanami questions here, and we’ll do our best to find you answers!

---

## [Determining what gets memoized](https://discourse.hanakai.org/t/determining-what-gets-memoized/1566)

<div class="topic-metadata">

**Author:** [@pat](https://discourse.hanakai.org/u/pat)\
**Replies:** 9\
**Last updated:** [October 16, 2026, 4:26am UTC](https://discourse.hanakai.org/t/determining-what-gets-memoized/1566 "2026-10-16T04:26:25Z")

</div>

Hullo Hanakai folks, I’m in the process of upgrading a large Hanami app to v3 - which means that all components are now memoized by default. I’m certainly keen to keep that behaviour for the performance benefits, so now…

---

## [convert empty params to nil](https://discourse.hanakai.org/t/convert-empty-params-to-nil/1525)

<div class="topic-metadata">

**Author:** [@ririya](https://discourse.hanakai.org/u/ririya)\
**Replies:** 5\
**Last updated:** [August 14, 2026, 6:56pm UTC](https://discourse.hanakai.org/t/convert-empty-params-to-nil/1525 "2026-08-14T18:56:31Z")

</div>

what’s the best way to convert a request parameter to nil if it’s empty? like if I have an action which is handling form input and I want to make sure every empty string is turned into a nil before attempting to store in…

---

## [accessing files from the public directory](https://discourse.hanakai.org/t/accessing-files-from-the-public-directory/1511)

<div class="topic-metadata">

**Author:** [@ririya](https://discourse.hanakai.org/u/ririya)\
**Replies:** 1\
**Last updated:** [August 3, 2026, 9:09pm UTC](https://discourse.hanakai.org/t/accessing-files-from-the-public-directory/1511 "2026-08-03T21:09:43Z")

</div>

if I put a test.jpg file into the public/ directory, should I just be able to use it in my template with \<img src="/test.jpg"\>? I’ve done it in my project, but going directly to the URL results in a 404 No route found f…

---

## [Handling file uploads](https://discourse.hanakai.org/t/handling-file-uploads/1507)

<div class="topic-metadata">

**Author:** [@ririya](https://discourse.hanakai.org/u/ririya)\
**Replies:** 5\
**Last updated:** [August 3, 2026, 6:09pm UTC](https://discourse.hanakai.org/t/handling-file-uploads/1507 "2026-08-03T18:09:26Z")

</div>

I’m trying to add file uploads to my project and I’m a bit lost. I’ve gotten as far as receiving a Tempfile in my action, but I’m wary of doing too much manual work if there is a better way. I’ve seen Shrine suggested, b…

---

## [Where is not null](https://discourse.hanakai.org/t/where-is-not-null/1506)

<div class="topic-metadata">

**Author:** [@ririya](https://discourse.hanakai.org/u/ririya)\
**Replies:** 4\
**Last updated:** [July 29, 2026, 11:09pm UTC](https://discourse.hanakai.org/t/where-is-not-null/1506 "2026-07-29T23:09:21Z")

</div>

Hi, I’m quite new to Hanami and to Ruby in general so please forgive me if this is a stupid question: How do I express the SQL WHERE column\_name IS NOT NULL in Rom? I’ve tried where(column\_name: !nil) and where { column…

---

## [about \`dry-system\` and \`Ruby::Box\`](https://discourse.hanakai.org/t/about-dry-system-and-ruby-box/1505)

<div class="topic-metadata">

**Author:** [@nachokb](https://discourse.hanakai.org/u/nachokb)\
**Replies:** 1\
**Last updated:** [July 26, 2026, 2:28pm UTC](https://discourse.hanakai.org/t/about-dry-system-and-ruby-box/1505 "2026-07-26T14:28:54Z")

</div>

Ruby 4.0’s introduction of \`Ruby::Box\` experimentally means that we will have (eventually) some mechanism of isolating constants; this could be used as part (a low-level part) of a dependency injection system. Matz’s ra…

---

## [Dry Schema/Validation: Array of multiple custom types -- is it possible?](https://discourse.hanakai.org/t/dry-schema-validation-array-of-multiple-custom-types-is-it-possible/1504)

<div class="topic-metadata">

**Author:** [@superchilled](https://discourse.hanakai.org/u/superchilled)\
**Replies:** 2\
**Last updated:** [July 11, 2026, 5:11pm UTC](https://discourse.hanakai.org/t/dry-schema-validation-array-of-multiple-custom-types-is-it-possible/1504 "2026-07-11T17:11:38Z")

</div>

Hi there. I’m pretty new to the Dry set of libraries (have been exploring the docs/playing around with it during the last few days and started on a basic POC). Just to provide some background to my use-case, I maintain …

---

## [Why "destroy" instead of "delete"?](https://discourse.hanakai.org/t/why-destroy-instead-of-delete/1458)

<div class="topic-metadata">

**Author:** [@Buzzkill-McSquare](https://discourse.hanakai.org/u/Buzzkill-McSquare)\
**Replies:** 6\
**Last updated:** [May 26, 2026, 12:36am UTC](https://discourse.hanakai.org/t/why-destroy-instead-of-delete/1458 "2026-05-26T00:36:46Z")

</div>

Hi, I have an idle question. I come from Rails and noticed that Hanami similarly has a resources route method that will create a route for a destroy action, even though the HTTP action is DELETE. The getting started guid…

---

## [Asset management without Node.js](https://discourse.hanakai.org/t/asset-management-without-node-js/1305)

<div class="topic-metadata">

**Author:** [@davidcelis](https://discourse.hanakai.org/u/davidcelis)\
**Replies:** 18\
**Last updated:** [May 16, 2026, 2:14pm UTC](https://discourse.hanakai.org/t/asset-management-without-node-js/1305 "2026-05-16T14:14:32Z")

</div>

Some of the more compelling newer features of Rails like Propshaft and importmaps have resulted in the framework no longer having a hard dependency on Node.js for asset bundling. I’ve found that not requiring Node has ma…

---

## [Namespace for operations](https://discourse.hanakai.org/t/namespace-for-operations/1418)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 5\
**Last updated:** [March 17, 2026, 3:25pm UTC](https://discourse.hanakai.org/t/namespace-for-operations/1418 "2026-03-17T15:25:23Z")

</div>

I have a question regarding the namespace for operations. I’m adding a notifier operation following the guides under Container and components. The guides state the operation should live in \`app/operations/my\_operation.rb…

---

## [Validating operation input](https://discourse.hanakai.org/t/validating-operation-input/1429)

<div class="topic-metadata">

**Author:** [@katafrakt](https://discourse.hanakai.org/u/katafrakt)\
**Replies:** 5\
**Last updated:** [March 16, 2026, 7:25pm UTC](https://discourse.hanakai.org/t/validating-operation-input/1429 "2026-03-16T19:25:46Z")

</div>

I wonder how other people feel about validating the operation input. I recently wrote an operation like this: module MyApp module Operations module Pages class Update \< MyApp::Operation include Deps\[…

---

## [Search engine for docs only finds docs for 1.3](https://discourse.hanakai.org/t/search-engine-for-docs-only-finds-docs-for-1-3/1416)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 2\
**Last updated:** [February 24, 2026, 7:33am UTC](https://discourse.hanakai.org/t/search-engine-for-docs-only-finds-docs-for-1-3/1416 "2026-02-24T07:33:53Z")

</div>

Hi, I’ve noticed that every single search result I get on https://guides.hanamirb.org goes to the 1.3 docs. Even if I’m explicitly on the version 2.3. For example, the search term “inherit” will return only 1.3 articles…

---

## [Minitest no longer available in 2.2?](https://discourse.hanakai.org/t/minitest-no-longer-available-in-2-2/1239)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 15\
**Last updated:** [February 21, 2026, 6:19am UTC](https://discourse.hanakai.org/t/minitest-no-longer-available-in-2-2/1239 "2026-02-21T06:19:10Z")

</div>

Hi, I’m returning to Ruby and Hanami after a long while and wanted to start with a fresh 2.2 app. I noticed there is no option to go for minitest as s framework when creating a new app. Will there be in the future or is…

---

## [Trying to get Warden to work in Action specs](https://discourse.hanakai.org/t/trying-to-get-warden-to-work-in-action-specs/1412)

<div class="topic-metadata">

**Author:** [@Sean](https://discourse.hanakai.org/u/Sean)\
**Replies:** 2\
**Last updated:** [February 18, 2026, 3:04am UTC](https://discourse.hanakai.org/t/trying-to-get-warden-to-work-in-action-specs/1412 "2026-02-18T03:04:17Z")

</div>

I’ve been dabbling with Hanami and enoying it but I’ve hit an issue I can’t seem to figure out. I’ve been following and adapting this post to implement Warden into Hanami and I’ve got it working in a way I’m pretty happy…

---

## [Form helper - syntax change](https://discourse.hanakai.org/t/form-helper-syntax-change/1409)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 8\
**Last updated:** [February 11, 2026, 12:24pm UTC](https://discourse.hanakai.org/t/form-helper-syntax-change/1409 "2026-02-11T12:24:33Z")

</div>

Hi, I was going to ruse some of my code from one of the 1.3 apps and in my 2.3 app and the form block style is apparently not supported anymore. This, for example returns undefined method div: div class: "my-class" do …

---

## [Hanami app for hosting TiddlyWikis?](https://discourse.hanakai.org/t/hanami-app-for-hosting-tiddlywikis/1360)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 3\
**Last updated:** [January 20, 2026, 10:45pm UTC](https://discourse.hanakai.org/t/hanami-app-for-hosting-tiddlywikis/1360 "2026-01-20T22:45:40Z")

</div>

Hi, I would like to use Hanami to host TiddlyWikis. Well, not just host as static files, but handle them as any other entity with CRUD actions. TiddlyWiki is a great standalone tool for note taking, to do lists and so m…

---

## [dry-validation i18n error full messages user friendly format](https://discourse.hanakai.org/t/dry-validation-i18n-error-full-messages-user-friendly-format/1390)

<div class="topic-metadata">

**Author:** [@gditrick](https://discourse.hanakai.org/u/gditrick)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 11:55pm UTC](https://discourse.hanakai.org/t/dry-validation-i18n-error-full-messages-user-friendly-format/1390 "2026-01-14T23:55:35Z")

</div>

The key for the field is always added to the full message and no way to make the key human readable that I can figure out. If there is a way to not have the key in the full error message or allow the ability to format i…

---

## [How do I set the size of the connection pool?](https://discourse.hanakai.org/t/how-do-i-set-the-size-of-the-connection-pool/1345)

<div class="topic-metadata">

**Author:** [@p81](https://discourse.hanakai.org/u/p81)\
**Replies:** 5\
**Last updated:** [December 31, 2025, 5:47am UTC](https://discourse.hanakai.org/t/how-do-i-set-the-size-of-the-connection-pool/1345 "2025-12-31T05:47:24Z")

</div>

I’m trying to improve the TechEmpower results for Hanami. The tests that talk to the database are disproportionately slower than the tests that don’t talk to the database. As the tests are run on a machine with a lot o…

---

## [Could not find action with key "actions.home/index"](https://discourse.hanakai.org/t/could-not-find-action-with-key-actions-home-index/1359)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 3\
**Last updated:** [December 16, 2025, 8:07am UTC](https://discourse.hanakai.org/t/could-not-find-action-with-key-actions-home-index/1359 "2025-12-16T08:07:53Z")

</div>

Hello, I’ve been following along the guides for 2.3 and up until the home.index action generation everything works as per the guides. The action is also generated without errors and all the content is there as expected.…

---

## [Guard not initialized](https://discourse.hanakai.org/t/guard-not-initialized/1357)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 1\
**Last updated:** [December 16, 2025, 7:57am UTC](https://discourse.hanakai.org/t/guard-not-initialized/1357 "2025-12-16T07:57:35Z")

</div>

Hi, I’ve just installed the latest Ruby and Hanami (Hanami version: 2.3.2 • Ruby version: ruby 3.3.2 (2024-05-30 revision e5a195edf6) \[x86\_64-linux\]) and when creating a new project this error popped up: No Guardfile ex…

---

## [bin/hanami command not found](https://discourse.hanakai.org/t/bin-hanami-command-not-found/1358)

<div class="topic-metadata">

**Author:** [@sebastjan\_hribar](https://discourse.hanakai.org/u/sebastjan_hribar)\
**Replies:** 2\
**Last updated:** [December 16, 2025, 7:14am UTC](https://discourse.hanakai.org/t/bin-hanami-command-not-found/1358 "2025-12-16T07:14:12Z")

</div>

Hi again, the bin/hanami generate action home.index --skip-route --skip-tests command returns this error with the latest Ruby and Hanami: bash: bin/hanami: No such file or directory Is my installation broken or is som…

---

## [Starting hanami in production environment](https://discourse.hanakai.org/t/starting-hanami-in-production-environment/1273)

<div class="topic-metadata">

**Author:** [@krzykamil](https://discourse.hanakai.org/u/krzykamil)\
**Replies:** 15\
**Last updated:** [October 2, 2025, 7:13am UTC](https://discourse.hanakai.org/t/starting-hanami-in-production-environment/1273 "2025-10-02T07:13:53Z")

</div>

Hey hey I am having some problems with the hanami server command. Namely I cannot start the server in production environment. I’ve tried: bundle exec hanami server --host 0.0.0.0 -e production with HANAMI\_ENV set to …

---

## [Add helpers to IRB console?](https://discourse.hanakai.org/t/add-helpers-to-irb-console/1304)

<div class="topic-metadata">

**Author:** [@jaredwhite](https://discourse.hanakai.org/u/jaredwhite)\
**Replies:** 7\
**Last updated:** [September 30, 2025, 1:13am UTC](https://discourse.hanakai.org/t/add-helpers-to-irb-console/1304 "2025-09-30T01:13:43Z")

</div>

I was looking to add a couple of helper methods (aka the same way you can call app, reload, etc.) directly to the Hanami console (using IRB), and I couldn’t find an official API for that so I hacked something together in…

---

## [Herb support documentation](https://discourse.hanakai.org/t/herb-support-documentation/1309)

<div class="topic-metadata">

**Author:** [@tcannonfodder](https://discourse.hanakai.org/u/tcannonfodder)\
**Replies:** 2\
**Last updated:** [September 27, 2025, 9:37am UTC](https://discourse.hanakai.org/t/herb-support-documentation/1309 "2025-09-27T09:37:19Z")

</div>

Herb has been gaining a ton of traction & interest. It’s been a shot in the arm whenever I’ve been able to use it. I didn’t see any topics about Herb, so I figured it would be good to start one! I don’t know if folks ha…

---

## [Sharing partials (templates) between slices](https://discourse.hanakai.org/t/sharing-partials-templates-between-slices/1300)

<div class="topic-metadata">

**Author:** [@buszu](https://discourse.hanakai.org/u/buszu)\
**Replies:** 3\
**Last updated:** [September 22, 2025, 12:43pm UTC](https://discourse.hanakai.org/t/sharing-partials-templates-between-slices/1300 "2025-09-22T12:43:56Z")

</div>

Hello, how can I have a partial that can be rendered in both app and across the slices? The actual use-case is related to the flash messages. I tried just rendering, but slices search in their own templates directory, a…

---

## [Where should business logic live?](https://discourse.hanakai.org/t/where-should-business-logic-live/1284)

<div class="topic-metadata">

**Author:** [@carolync](https://discourse.hanakai.org/u/carolync)\
**Replies:** 10\
**Last updated:** [July 31, 2025, 2:08am UTC](https://discourse.hanakai.org/t/where-should-business-logic-live/1284 "2025-07-31T02:08:40Z")

</div>

Hi! So my assumption was that business logic should live in a Struct until I read “A Hanami struct is immutable, and contains no business logic. They are extensible for adding presentation logic:” I would have thought …

---

## [Breakpoints and debuggers](https://discourse.hanakai.org/t/breakpoints-and-debuggers/1193)

<div class="topic-metadata">

**Author:** [@svoop](https://discourse.hanakai.org/u/svoop)\
**Replies:** 6\
**Last updated:** [July 28, 2025, 10:49am UTC](https://discourse.hanakai.org/t/breakpoints-and-debuggers/1193 "2025-07-28T10:49:45Z")

</div>

I’m mostly using binding.irb to explore or debug code, however, it doesn’t work with either of: bin/dev hanami server This is usually caused by Puma serving multithreaded, but even when set to threads 1, 1 (and worker…

---

## [tilt json example?](https://discourse.hanakai.org/t/tilt-json-example/1280)

<div class="topic-metadata">

**Author:** [@carolync](https://discourse.hanakai.org/u/carolync)\
**Replies:** 3\
**Last updated:** [July 23, 2025, 4:57pm UTC](https://discourse.hanakai.org/t/tilt-json-example/1280 "2025-07-23T16:57:38Z")

</div>

Hi! I’m trying to utilize tilt to use jbuilder to build my json. I have templates named show.json.jbuilder and I have installed gem 'tilt-jbuilder' in my Gemfile. The documentation seems to indicate this would be enou…

---

## [Event Bus w/ various modes](https://discourse.hanakai.org/t/event-bus-w-various-modes/1275)

<div class="topic-metadata">

**Author:** [@gpassero](https://discourse.hanakai.org/u/gpassero)\
**Replies:** 1\
**Last updated:** [July 13, 2025, 4:47pm UTC](https://discourse.hanakai.org/t/event-bus-w-various-modes/1275 "2025-07-13T16:47:07Z")

</div>

We’re building a modular monolith and needed an event bus. We wanted one that would make it easy to use for dev mode, could scale for production use, and possibly even allow other apps to tie in (as our organization grow…

[Next page](https://discourse.hanakai.org/c/questions/9.md?page=1)
