gpt4 book ai didi

JRuby EventMachine 没有要加载的文件

转载 作者:行者123 更新时间:2023-12-01 09:39:51 24 4
gpt4 key购买 nike

我在 JRuby 中安装了 EventMachine(我使用的是 Win32)。当我尝试服务器示例时,出现错误

require 'eventmachine'

错误是:

C:\dev\em>jruby server.rb

server.rb:1:in `require': 没有要加载的文件 -- eventmachine (LoadError) 来自 server.rb:1

但是 gem 已经安装了!

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

最佳答案

你需要先加载RubyGems,

require 'rubygems'

关于JRuby EventMachine 没有要加载的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1445059/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com