Questions tagged [hanami]

Hanami is an open source web framework for Ruby developed by Luca Guidi.

Hanami is a web based framework for Ruby that puts the focus on simplicity, fewer DSL's, few conventions, more objects, zero monkey-patching of the core language and standard lib and separation of concerns for MVC layers.

It suggests patterns, rather than imposing patterns. It leaves all the freedom to developers to build their own architecture, choose the inheritance structure. It tries to simplify testability, and encourages single, well defined responsibilities between classes.

Hanami was formerly known as Lotus, the name was changed to avoid trademark issues.

90 questions
1
vote
2 answers

Form Help In Hanamirb (Lotusrb)

Does hanami support below code? <%= form_for :question, routes.question_path. method: 'post' do %>
`enter code here` …
1
vote
1 answer

Feedback message in LotusRB

What is the suggested way to set a feedback message in Lotus? Something like flash messages in Rails. In my create action I create my entity and after I redirect to index. Now I'd like to display in index a "entity successfully saved"…
Sig
  • 5,476
  • 10
  • 49
  • 89
0
votes
1 answer

hanami 2.0 with sequel

I'm following this guide for getting started with hanami: https://guides.hanamirb.org/v2.0/introduction/getting-started/ Rather than using ROM, I prefer Sequel, but I stumble upon the persistancy…
thiebo
  • 1,339
  • 1
  • 17
  • 37
0
votes
0 answers

User in docker can't create folders and files

I have a problem with creating folders and files within a docker container. I have a Ruby and Hanami web app deployed using Dockerfile and docker-compose yaml. Here is the content of both files for reference. Dockerfile: FROM…
Sebastjan Hribar
  • 396
  • 3
  • 13
0
votes
0 answers

Hanami framework doesn't work with many to many through?

I used rich many to many... class OwnerRepository < Hanami::Repository associations do has_one :avator has_many :oneships#It's for join table.. has_many :avators,through: :oneships end def…
aaaa
  • 73
  • 1
  • 6
0
votes
2 answers

Can we have multiple database instances on a Ruby project using Hanami?

Currently we have a single Aurora Postgresql db instance that we are interacting with but I would like to add one more db instance so that we can read from one database and write to another(existing one). We are using Hanami v1.3 and the project is…
0
votes
0 answers

Problem with postgres for 2 concurrent docker deployments on the same host

I'm having issues with postgres for 2 docker deployments on the same host. I need to deploy the same app with docker compose on the same host. I have one docker-compose file and two .env for each instance. The app is built with Ruby and Hanami web…
0
votes
0 answers

Static files are not loaded when served in a dockerized app with nginx

I'm having problems with static files when served with nginx in my dockerized app. Stack: Ruby + Hanami + Postgres + Puma + nginx Static files: images, fonts, js files and css. I wanted nginx to serve static files instead of Hanami. I have all…
Sebastjan Hribar
  • 396
  • 3
  • 13
0
votes
1 answer

How can I run an Hanami app via puma-dev?

Starting my small Hanami application via bundle exec hanami server works fine. Serving it with puma-dev fails, however, I am getting this in ~/Library/Logs/puma-dev.log: ! Booting app 'zipper-b2957350' on socket…
Alexander Presber
  • 6,429
  • 2
  • 37
  • 66
0
votes
1 answer

Hamani: Entities and Repositories what is the difference?

I continue to study hanami on my own and I ran into the fact that when generating the User model, hanami generates 2 entities and repositories directories that contain files user.rb in the entities directory class User <…
0
votes
0 answers

Using W3.CSS classes with LESS

I'm styling a Hanami project and I'm using W3.CSS. I have a whole bunch of entities that are styled the same, so instead of having a myriad of identical styles across a hundred files, I want to use LESS to combine W3.CSS styles, so that if changes…
0
votes
1 answer

How to install and run "hanami new bookshelf" from zsh

I installed the Hanami gem and ran hanami new bookshelf but got zsh: command not found: hanami I'm running: macos 10.15.1 homebrew: 2.1.16 ruby: 2.6.5p114 rubygem: 3.0.6 hanami: 1.3.3 Does anyone know how to resolve this?
0
votes
1 answer

How can I use the method (helper) defined in a view in another view?

Let's say I have a form defined in View module Admin module Views module Dashboard class New include Admin::View def form form_for :link, routes.links_path do text_field :url submit…
Alex
  • 35
  • 6
0
votes
1 answer

Relation#as will change behavior in 4.0. Use `map_to` instead

In hanami guide https://hanamirb.org/guides/1.2/associations/has-many/#usage when I use the method @book = BookRepository.new.find_with_tickets(params[:id]) I got a message: [deprecated] Relation#as will change behavior in 4.0. Use `map_to`…
0
votes
1 answer

Capybara+Selenium+Docker confusion: Remote Firefox hangs

We've been stumped trying to figure out how to get Selenium JavaScript testing working with our Dockerised Ruby (Hanami) app. For spec examples that don't depend on JavaScript, of course, the Capybara-default Rack::Test driver is adequate, but every…
Jeff Dickey
  • 1,071
  • 11
  • 21