问题
I'm in the middle of trying to run an RoR app on my Windows machine. I've made a lot of progress with getting everything configured, but I'm stuck here. When I try to run rake, I get the following error:
C:\inetpub\wwwroot\voterApp>rails server
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- eventmachine (LoadError)
from C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
I've done 'gem install eventmachine --pre', but this doesn't seem to have helped. Can anyone point me in the right direction? I've read about the ruby load path being messed up, but I'm not sure how that quite fits in this context.
回答1:
I just found out that bundler wasn't pulling in eventmachine; I had to update my gemfile to require it. Turns out 'gem list' is for your machine's ruby, not your porject gems. I hope this helps anyone else who might run into a similar issue
来源:https://stackoverflow.com/questions/9332810/ruby-on-rails-cannot-load-such-file-eventmachine