gpt4 book ai didi

ruby-on-rails - 在 OSX Yosemite 上安装 EventMachine gem 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 06:27:22 26 4
gpt4 key购买 nike

这是错误消息的完整输出:

    Fetching: eventmachine-1.0.3.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.

/Users/Tyler/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20141229-47086-wfdm3m.rb extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
em.cpp:827:9: error: use of undeclared identifier 'rb_thread_select'; did you mean 'rb_thread_fd_select'?
return EmSelect (maxsocket+1, &fdreads, &fdwrites, &fderrors, &tv);
^~~~~~~~
rb_thread_fd_select
./em.h:25:20: note: expanded from macro 'EmSelect'
#define EmSelect rb_thread_select
^
/Users/Tyler/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/intern.h:454:5: note: 'rb_thread_fd_select' declared here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
^
em.cpp:827:32: error: cannot initialize a parameter of type 'rb_fdset_t *' with an rvalue of type 'fd_set *'
return EmSelect (maxsocket+1, &fdreads, &fdwrites, &fderrors, &tv);
^~~~~~~~
/Users/Tyler/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/intern.h:454:42: note: passing argument to parameter here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
^
em.cpp:946:6: error: use of undeclared identifier 'rb_thread_select'; did you mean 'rb_thread_fd_select'?
EmSelect (0, NULL, NULL, NULL, &tv);
^~~~~~~~
rb_thread_fd_select
./em.h:25:20: note: expanded from macro 'EmSelect'
#define EmSelect rb_thread_select
^
/Users/Tyler/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/intern.h:454:5: note: 'rb_thread_fd_select' declared here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
^
3 errors generated.
make: *** [em.o] Error 1

make failed, exit code 2

有没有人见过这样的错误?我有命令行工具 - 在同样运行 Yosemite 的旧笔记本电脑上编译此 gem 时从未遇到错误。

最佳答案

EventMachine 1.0.3 didn’t work with Ruby 2.2 .这已在 EventMachine 1.0.4 中修复。您很可能可以通过升级 EventMachine 来解决您的问题

bundle update eventmachine

关于ruby-on-rails - 在 OSX Yosemite 上安装 EventMachine gem 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27699357/

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