Domanda

Ho installato EventMachine in JRuby (sto usando Win32). Quando provo l'esempio del server, ottengo un errore quando

require 'eventmachine'

L'errore è:

C:\dev\em>jruby server.rb

server.rb: 1: in `require ': nessun file da caricare - eventmachine (LoadError)         da server.rb: 1

Ma la gemma è installata!

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
È stato utile?

Soluzione

Devi prima caricare RubyGems,

require 'rubygems'

Altri suggerimenti

La gemma potrebbe non essere installata per jruby. Prova jgem install eventmachine

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top