Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hanami server 2.0.3 on Windows 10 fails with "worker mode not supported" error #1285

Open
pcopissa opened this issue Feb 16, 2023 · 3 comments

Comments

@pcopissa
Copy link

On Windows 10 64bits follow the steps in https://guides.hanamirb.org/v2.0/introduction/getting-started/
That is:

  1. Install Ruby 3.2.1 (using RubyInstaller)
  2. In a Ruby-enabled cmd prompt, install hanami 2.0.3 via ridk exec get install hanami.
  3. In a Ruby-enabled cmd prompt, create a new project via hanami new test. Manually finish the installation with bundle install (to install missing rack-test)
  4. In a Ruby-enabled DOS prompt, start webserver (Puma presumably) via bundle exec hanami server
  5. In browser, enter URL http://localhost:2300
  6. Observed result: The browser displays an error message Connection failed. Furthermore the DOS prompt in step 2 shows: ERROR: worker mode not supported on ruby on this platform
  7. Expected result (according to the "Getting started" page): The browser displays Hello from Hanami
@carlosm27
Copy link

Could you try to go to the config/puma.rb file and comment on the line workers ENV.fetch("HANAMI_WEB_CONCURRENCY", 2). That works for me.

@timriley
Copy link
Member

timriley commented May 6, 2023

Thanks for adding this detail, @carlosm27. From the sounds of it, if we just use a single worker by default, we should be OK on Windows?

@carlosm27
Copy link

Yes, I just tried on Windows 11. I think it will work also on Windows 10. I got the solution from this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants