Ruby Gem(EventMachine)无法使用Bundler GEM安装

6

我正在尝试安装GitLab,他们要求我使用一个名为“bundler”的gem,它可以安装运行该应用程序所需的必要GEM。无论如何,在运行bundler之后,使用以下命令:

sudo -u git -H bundle install --deployment --without development test mysql aws

这将完美地安装大量的宝石,然后在安装约2分钟后,终端会出现以下错误。
Ruby版本:来自SVN的最新版本(我已经检查过了,一切正常)
操作系统:Ubuntu 14.04 LTS(可靠)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/bin/ruby 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... yes
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... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling ssl.cpp
compiling em.cpp
em.cpp: In member function ‘void EventMachine_t::_RunEpollOnce()’:
em.cpp:574:37: error: ‘rb_thread_select’ was not declared in this scope
    EmSelect (0, NULL, NULL, NULL, &tv);
                                 ^
em.cpp: In member function ‘int SelectData_t::_Select()’:
em.cpp:827:67: error: ‘rb_thread_select’ was not declared in this scope
  return EmSelect (maxsocket+1, &fdreads, &fdwrites, &fderrors, &tv);
                                                               ^
em.cpp: In member function ‘void EventMachine_t::_RunSelectOnce()’:
em.cpp:946:40: error: ‘rb_thread_select’ was not declared in this scope
  EmSelect (0, NULL, NULL, NULL, &tv);
                                    ^
make: *** [em.o] Error 1

make failed, exit code 2

Gem files will remain installed in         /home/git/gitlab/vendor/bundle/ruby/2.2.0/gems/eventmachine-1.0.3 for inspection.

Results logged to /home/git/gitlab/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/eventmachine-1.0.3/gem_make.out

An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.

我的意思是,如果现在没有人回应,我想我们可以等待Trusty Tahr发布,然后再担心它? :P - jaredjones
1个回答

10

这可能只是在Ruby 2.2中存在的问题,你可以尝试使用2.1版本,因为"他们开始开发Ruby 2.2的那一刻,就废弃了一堆库,并升级readline到一个新的版本。当他们这样做时,它破坏了低于Ruby 2.2的任何内容。"

参见:https://github.com/eventmachine/eventmachine/issues/509


2
是的,在Ubuntu 14.10上,'rvm use 2.1.5' 对我解决了这个问题。谢了,伙计! - Drops

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接