Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby Gem (EventMachine) Will Not Install Using the Bundler GEM

So I'm trying to install GitLab and they're having me use a gem called "bundler" which basically installs the required GEMs necessary to run their application. Anyhow, after running the bundler using:

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

This will install a ton of gems perfectly then about 2 minutes into the installation I'll get the following error in terminal.

Ruby Version: Latest from SVN (I've checked and its fine)

OS: Ubuntu 14.04 LTS (Trusty)


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.
like image 667
jaredjones Avatar asked Apr 13 '14 01:04

jaredjones


1 Answers

This may only be an issue in ruby 2.2 so you might try using 2.1 as "The moment they started work on Ruby 2.2 they deprecated a bunch of libraries and upgrade readline to a newer version. When they did this it broke anything less than Ruby 2.2."

see: https://github.com/eventmachine/eventmachine/issues/509

like image 176
errata Avatar answered Oct 13 '22 13:10

errata