Unable to load the EventMachine C extension; To use the pure-ruby reactor
If you are using windows
Go to this folder
C:\Ruby24-x64\lib\ruby\gems\2.4.0\gems\eventmachine-1.2.5-x64-mingw32\lib
open this file eventmachine.rb
- write this
require 'em/pure_ruby'
in the first line of code in the file
this will make it work with no issues.
For Ruby 2.4 & eventmachine 1.2.6 on Windows 10.
You gotta uninstall first eventmachine
and then install it again with platform ruby:
gem uninstall eventmachine (select all versions if prompted)gem install eventmachine --platform ruby
I was encountering this error message on Windows 10 while trying to use Jekyll's LiveReload feature. The other answers here did not solve the problem completely, or risked having the issue re-occur the next time bundle install
is run.
My solution (taken from this site) was to:
Run this console command
gem uninstall eventmachine
and choose to uninstall
eventmachine-1.2.7-x64-mingw32
gems from your system.Edit
Gemfile
inside your project directory and add this line inside:gem 'eventmachine', '1.2.7', git: 'https://github.com/eventmachine/eventmachine.git', tag: 'v1.2.7'
Run
bundle install
Clean up your jekyll build and cache with command
bundle exec jekyll clean
You can now use the --livereload
parameter without getting any issue, even if you execute bundle install
in future.