Guard not initialized

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 exists at Guardfile.

After initializing the guard manually, it worked fine and the app booted.

Is there a reason this has to be done manually? I haven’t found any reference to it in the guides.

best, seba

This sounds your hanami new command didn’t fully complete. hanami new will internally run hanami install, which create files supplied by other bundled gems. In this case, hanami install is needed for the hanami-reloader gem to generate your Guardfile. Did you see any errors when you were running hanami new?

Either way, if you manually run bin/hanami install inside your app, it should generate all these necessary files for you :slight_smile:

This is the kind of thing that you could test out on a new hanami project too. If you run hanami new some_new_app today, does it generate the Guardfile?