gpt4 book ai didi

ruby-on-rails - Ruby Gem (EventMachine) 无法使用 Bundler GEM 安装

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

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

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

这将完美地安装大量 gem,然后在安装后大约 2 分钟,我将在终端中收到以下错误。

Ruby 版本:来自 SVN 的最新版本(我已经检查过了,没问题)

操作系统: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.

最佳答案

这可能只是 ruby​​ 2.2 中的一个问题,所以你可以尝试使用 2.1 作为“他们开始在 Ruby 2.2 上工作的那一刻,他们弃用了一堆库并将 readline 升级到更新的版本。当他们这样做时,它破坏了更少的东西比 Ruby 2.2 还好。”

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

关于ruby-on-rails - Ruby Gem (EventMachine) 无法使用 Bundler GEM 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23038190/

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