Ruby on Rails: “cannot load such file” eventmachine

倾然丶 夕夏残阳落幕 提交于 2019-12-23 17:45:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!