noi4r gem 安装问题

noi4r gem install issues

正在尝试安装 nio4r gem。我试过了

gem install nio4r -v '1.0.0'

弹出的错误是:

Building native extensions.  This could take a while...
ERROR:  Error installing nio4r:

ERROR: Failed to build gem native extension.

/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150406-11564-1qtifmf.rb extconf.rb

checking for rb_thread_blocking_region()... no
checking for sys/select.h... yes
checking for poll.h... yes
checking for sys/epoll.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for port.h... no
checking for sys/resource.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling monitor.c
In file included from monitor.c:6:
In file included from ./nio4r.h:10:
/.rvm/rubies/ruby-2.2.1/include/ruby-2.2.0/ruby/backward/rubyio.h:2:2: warning: use "ruby/io.h" instead of "rubyio.h" [-W#warnings]
warning use "ruby/io.h" instead of "rubyio.h"

...

我哪里错了?我的 RVM 有问题吗?

通过一些基本的更新,我能够让它工作。

bundle update

然后

bundle

安装 gem.

感谢https://github.com/celluloid/nio4r/issues/46

另一种方法是使用 RVM 安装更高版本的 ruby 并再次执行 bundle。两个作品