Skip to content

Windows support running hanami dev #219

Description

@kyleplump

Tried to start developing on a windows machine and running into the following error executing: bundle exec hanami dev:

C:/Ruby33-x64/lib/ruby/3.3.0/open3.rb:534:in spawn': Exec format error - bin/dev (Errno::ENOEXEC)`

It look's like this might have been a bug introduced relatively recently? Or at least reported recently: https://www.reddit.com/r/ruby/comments/1b1c0yp/hanami_21_is_out/

Reproducible Steps

Create a new Hanami app on a windows machine and run the command:
gem install hanami
hanami new win_app
cd win_app
bundle exec hanami dev

It seems like it comes down to windows just not natively supporting bash? Although, even using Git Bash - same issue.

A few things I tried:

  1. Running hanami server directly seems to start everything up - but probably don't want to circumvent the procfile
  2. Converting dev.sh to dev.bat half works - the asset command forks a process, where forking isn't supported on non-POSIX (https://ruby-doc.org/core-2.6.2/Process.html#method-c-fork)

Any thoughts on Windows support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions