我无法在简单的测试程序中使用EventMachine.我正在运行Ruby 1.9.2(x86_64-darwin10.4.0)和Rails 3.0.1.安装了EventMachine(via gem install eventmachine),gem知道它:
gem list --local *** LOCAL GEMS *** abstract (1.0.0) ... erubis (2.6.6) eventmachine (0.12.10) i18n (0.4.2) ... tzinfo (0.3.23)
然而,当我启动rails控制台(通过rails console)并且只需要eventmachine时,它会爆炸:
ruby-1.9.2-p0 > require 'rubygems'
=> nil
ruby-1.9.2-p0 > require 'eventmachine'
LoadError: no such file to load -- eventmachine
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in 'require'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in 'block in require'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in 'block in load_dependency'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:591:in 'new_constants_in'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in 'load_dependency'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in 'require'
from (irb):2
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands/console.rb:44:in 'start'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands/console.rb:8:in 'start'
from /Users/russ/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands.rb:23:in '<top (required)>' …