简体   繁体   English

Ruby on Rails:“无法加载此类文件”eventmachine

[英]Ruby on Rails: “cannot load such file” eventmachine

I'm in the middle of trying to run an RoR app on my Windows machine. 我正在尝试在我的Windows机器上运行RoR应用程序。 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: 当我尝试运行rake时,我收到以下错误:

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. 我已经完成了'gem install eventmachine --pre',但这似乎没有帮助。 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. 我已经读过关于ruby加载路径搞砸了,但是我不确定它在这种情况下是如何完全适合的。

I just found out that bundler wasn't pulling in eventmachine; 我刚刚发现捆绑器没有拉动事件机器; I had to update my gemfile to require it. 我不得不更新我的gemfile以要求它。 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 我希望这可以帮助其他可能遇到类似问题的人

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM