JRuby EventMachine no such file to load
-
22-07-2019 - |
Question
I have intalled EventMachine in JRuby (I am using Win32). When I try the server example, I get an error when
require 'eventmachine'
The error is:
C:\dev\em>jruby server.rb
server.rb:1:in `require': no such file to load -- eventmachine (LoadError) from server.rb:1
But the gem is installed!
C:\dev\myapp>jruby -S gem install eventmachine
Successfully installed eventmachine-0.12.8-java
1 gem installed
Installing ri documentation for eventmachine-0.12.8-java...
Installing RDoc documentation for eventmachine-0.12.8-java...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
Solution
You need to first load RubyGems,
require 'rubygems'
OTHER TIPS
The gem may not be installed for jruby. Try jgem install eventmachine
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow