I recommend to install Ruby via Scoop, then
gem install ffi
gem install eventmachine
RUBY_DLL_PATH
must be set:
$env:RUBY_DLL_PATH="C:\dev\xframes-ruby"
sudo apt install ruby-full
sudo gem install ffi
sudo gem install eventmachine
ruby main.rb
Windows 11
Raspberry Pi 5