Ruby rails: An error occurred while installing eventmachine_httpserver

Viewed 32

I am trying to get ruby on rails to set up on my win10. I am trying to get a server running open source project openproject however I am getting an error when trying to bundle install on the eventmachine_httpserver (0.2.1) gem. I'm not sure exactly what i'm looking at, can anyone help me fix this?

bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies......
Using rake 13.0.6
......
Using openproject-openid_connect 1.0.0 from source at `modules/openid_connect`
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
D:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/eventmachine_httpserver-0.2.1/ext
D:/Ruby31-x64/bin/ruby.exe -I D:/Ruby31-x64/lib/ruby/3.1.0 -r
./siteconf20220913-3784-krldde.rb extconf.rb
checking for -lpthread... yes
checking for -lssl... yes
checking for -lcrypto... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
creating Makefile

current directory:
D:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/eventmachine_httpserver-0.2.1/ext
make DESTDIR\= clean

current directory:
D:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/eventmachine_httpserver-0.2.1/ext
make DESTDIR\=
generating eventmachine_httpserver-x64-mingw-ucrt.def
compiling http.cpp
http.cpp: In member function 'void HttpConnection_t::ConsumeData(const char*,
int)':
http.cpp:192:33: error: 'unsetenv' was not declared in this scope; did you mean
'getenv'?
  192 |                                 unsetenv ("REQUEST_METHOD");
      |                                 ^~~~~~~~
      |                                 getenv
http.cpp: In member function 'bool HttpConnection_t::_InterpretHeaderLine(const
char*)':
......

make failed, exit code 2
An error occurred while installing eventmachine_httpserver (0.2.1), and Bundler
cannot continue.

In Gemfile:
  puffing-billy was resolved to 3.0.4, which depends on
    eventmachine_httpserver

This is the Makefile at D:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/eventmachine_httpserver-0.2.1/ext/Makefile:

SHELL = /bin/sh
# V=0 quiet, V=1 verbose.  other values don't work.
V = 0
V0 = $(V:0=)
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@ :)
ECHO = $(ECHO1:0=@ echo)
NULLCMD = :

#### Start of system configuration section. ####

srcdir = .
topdir = /D/Ruby31-x64/include/ruby-3.1.0
hdrdir = $(topdir)
arch_hdrdir = /D/Ruby31-x64/include/ruby-3.1.0/x64-mingw-ucrt
PATH_SEPARATOR = :
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
prefix = $(DESTDIR)/D/Ruby31-x64
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
rubyarchprefix = $(rubylibprefix)/$(arch)
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
exec_prefix = $(prefix)
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
sitehdrdir = $(rubyhdrdir)/site_ruby
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
vendorarchdir = $(vendorlibdir)/$(sitearch)
vendorlibdir = $(vendordir)/$(ruby_version)
vendordir = $(rubylibprefix)/vendor_ruby
sitearchdir = $(DESTDIR)./.gem.20220913-20372-gozah6
sitelibdir = $(DESTDIR)./.gem.20220913-20372-gozah6
sitedir = $(rubylibprefix)/site_ruby
rubyarchdir = $(rubylibdir)/$(arch)
rubylibdir = $(rubylibprefix)/$(ruby_version)
sitearchincludedir = $(includedir)/$(sitearch)
archincludedir = $(includedir)/$(arch)
sitearchlibdir = $(libdir)/$(sitearch)
archlibdir = $(libdir)/$(arch)
ridir = $(datarootdir)/$(RI_BASE_NAME)
mandir = $(datarootdir)/man
localedir = $(datarootdir)/locale
libdir = $(exec_prefix)/lib
psdir = $(docdir)
pdfdir = $(docdir)
dvidir = $(docdir)
htmldir = $(docdir)
infodir = $(datarootdir)/info
docdir = $(datarootdir)/doc/$(PACKAGE)
oldincludedir = $(DESTDIR)/usr/include
includedir = $(prefix)/include
runstatedir = $(localstatedir)/run
localstatedir = $(prefix)/var
sharedstatedir = $(prefix)/com
sysconfdir = $(DESTDIR)
datadir = $(datarootdir)
datarootdir = $(prefix)/share
libexecdir = $(exec_prefix)/libexec
sbindir = $(exec_prefix)/sbin
bindir = $(exec_prefix)/bin
archdir = $(rubyarchdir)

This is the mkmf.log file:

cc1.exe: error: unrecognized command line option "-fstack-protector-strong"

cc1.exe: error: unrecognized command line option "-fstack-protector-strong"

conftest.c:1:0: sorry, unimplemented: 64-bit mode not compiled in

checked program was:

/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return !!argv[argc];
8: }
/* end */
0 Answers
Related