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

Eventmachine on windows #166

Closed
Waidmann opened this issue Jun 15, 2020 · 4 comments
Closed

Eventmachine on windows #166

Waidmann opened this issue Jun 15, 2020 · 4 comments
Assignees
Milestone

Comments

@Waidmann
Copy link

Describe the bug
On windows 10, when zou follow the installation instructions givn in the readme, zou run into the following error:

Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
Traceback (most recent call last):
        9: from C:/Ruby26-x64/bin/thin:23:in `<main>'
        8: from C:/Ruby26-x64/bin/thin:23:in `load'
        7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/bin/thin:5:in `<top (required)>'
        6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/bin/thin:5:in `require'
        5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin.rb:7:in `<top (required)>'
        4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin.rb:7:in `require'
        3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `<top (required)>'
        2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `require'
        1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `require': cannot load such file -- 2.6/rubyeventmachine (LoadError)

You can fix this by editing the eventmachine-1.2.7-x64-mingw32 ruby to require 'em/pure_ruby', however when you do this, another error will pop up when trying to run 'smashing start':

Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop
3Traceback (most recent call last):
        20: from C:/Ruby26-x64/bin/thin:23:in `<main>'
        19: from C:/Ruby26-x64/bin/thin:23:in `load'
        18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/bin/thin:6:in `<top (required)>'
        17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/runner.rb:159:in `run!'
        16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/runner.rb:203:in `run_command'
        15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:87:in `start'
        14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/server.rb:162:in `start'
        13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/backends/base.rb:73:in `start'
        12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:197:in `run'
        11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/em/pure_ruby.rb:144:in `run_machine'
        10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/em/pure_ruby.rb:547:in `run'
         9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/em/pure_ruby.rb:547:in `loop'
         8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/em/pure_ruby.rb:551:in `block in run'
         7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/em/pure_ruby.rb:568:in `run_timers'
         6: from C:/Ruby26-x64/lib/ruby/2.6.0/set.rb:777:in `each'
         5: from C:/Ruby26-x64/lib/ruby/2.6.0/set.rb:777:in `each'
         4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/em/pure_ruby.rb:571:in `block in run_timers'
         3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:1547:in `event_callback'
         2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/backends/base.rb:63:in `block in start'
         1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/backends/tcp_server.rb:19:in `connect'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thin-1.7.2/lib/thin/backends/tcp_server.rb:19:in `unpack_sockaddr_in': no implicit conversion of nil into String (TypeError)

To Reproduce
On windows, download and install rubywindows installer
Follow the instructions given in the readme

@Waidmann Waidmann added the bug label Jun 15, 2020
@rompic
Copy link
Contributor

rompic commented Jul 1, 2020

maybe try
oneclick/rubyinstaller2#96
instead

gem uninstall eventmachine
gem install eventmachine --platform ruby

@painbank
Copy link

maybe try
oneclick/rubyinstaller2#96
instead

gem uninstall eventmachine
gem install eventmachine --platform ruby

I tried this and it didn't work for me

@rompic
Copy link
Contributor

rompic commented Mar 17, 2021

Please join the current discussion in the gitter channel.
Where I recently wrote;
so... i kinda got it working with ruby 2.5 and it's a mess :|
it definitely requires installing nodejs (see #172)
and it seems I only managed to run it with native eventmachine (#131) and by copying the native eventmachine gem and renaming it to eventmachine-1.2.7-x64-mingw32 because thin somehow seems to depend on it

@kinow kinow added the windows label Mar 30, 2021
@kinow
Copy link
Member

kinow commented Mar 30, 2021

Updated installation instructions with link to issues, and a workaround that requires only editing files in the dashboard folder: https://github.com/Smashing/smashing/wiki/Installation#problems-starting-smashing-due-to-thineventmachine

@kinow kinow closed this as completed Mar 30, 2021
@kinow kinow added this to the 1.3.5 milestone Mar 30, 2021
@kinow kinow self-assigned this Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants