Issue #12163 has been reported by Dawes Graybeal.

----------------------------------------
Bug #12163: New to redmine & ruby, cannot get it to install
https://bugs.ruby-lang.org/issues/12163

* Author: Dawes Graybeal
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Installation output for redmine 3.2.0:
 [root@localhost redmine]# /usr/local/bin/bundle install --without development test
/usr/local/share/gems/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/shell/basic.rb:356: warning: Insecure world writable dir /usr in PATH, mode 040777
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
/usr/share/gems/gems/psych-2.0.8/lib/psych.rb:220: warning: already initialized constant Psych::VERSION
/usr/share/ruby/psych.rb:220: warning: previous definition of VERSION was here
/usr/share/gems/gems/psych-2.0.8/lib/psych.rb:223: warning: already initialized constant Psych::LIBYAML_VERSION
/usr/share/ruby/psych.rb:223: warning: previous definition of LIBYAML_VERSION was here
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...............
Using rake 11.0.1
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99.1
Using arel 6.0.3
Using addressable 2.4.0
Using bundler 1.11.2
Using coderay 1.1.1
Using concurrent-ruby 1.0.1
Using htmlentities 4.3.1
Using thor 0.19.1
Installing mysql2 0.3.20 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby -r ./siteconf20160309-3924-14z55q5.rb extconf.rb
checking for ruby/thread.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/share/ruby/mkmf.rb:587:in `try_cpp'
    from /usr/share/ruby/mkmf.rb:1060:in `block in have_header'
    from /usr/share/ruby/mkmf.rb:911:in `block in checking_for'
    from /usr/share/ruby/mkmf.rb:351:in `block (2 levels) in postpone'
    from /usr/share/ruby/mkmf.rb:321:in `open'
    from /usr/share/ruby/mkmf.rb:351:in `block in postpone'
    from /usr/share/ruby/mkmf.rb:321:in `open'
    from /usr/share/ruby/mkmf.rb:347:in `postpone'
    from /usr/share/ruby/mkmf.rb:910:in `checking_for'
    from /usr/share/ruby/mkmf.rb:1059:in `have_header'
    from extconf.rb:15:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/mysql2-0.3.20 for inspection.
Results logged to /usr/local/lib64/gems/ruby/mysql2-0.3.20/gem_make.out
Using net-ldap 0.12.1
Using ruby-openid 2.3.0
Using rbpdf-font 1.19.0
Installing redcarpet 3.3.4 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby -r ./siteconf20160309-3924-1bahmjx.rb extconf.rb
creating Makefile

make "DESTDIR=" clean
rm -f
rm -f redcarpet.so  *.o  *.bak mkmf.log .*.time

make "DESTDIR="
make: *** No rule to make target '/usr/share/include/ruby/ruby.h', needed by 'rc_markdown.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /usr/local/share/gems/gems/redcarpet-3.3.4 for inspection.
Results logged to /usr/local/lib64/gems/ruby/redcarpet-3.3.4/gem_make.out
Using request_store 1.0.5
Installing rmagick 2.15.4 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby -r ./siteconf20160309-3924-sp4m5y.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/lib64/gems/ruby/rmagick-2.15.4/gem_make.out
Using tzinfo 1.2.2
Installing nokogiri 1.6.7.2 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby -r ./siteconf20160309-3924-qkbtfg.rb extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)
    --help
    --clean
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/share/ruby/mkmf.rb:571:in `block in try_compile'
    from /usr/share/ruby/mkmf.rb:522:in `with_werror'
    from /usr/share/ruby/mkmf.rb:571:in `try_compile'
    from extconf.rb:80:in `nokogiri_try_compile'
    from extconf.rb:87:in `block in add_cflags'
    from /usr/share/ruby/mkmf.rb:619:in `with_cflags'
    from extconf.rb:86:in `add_cflags'
    from extconf.rb:336:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /usr/local/lib64/gems/ruby/nokogiri-1.6.7.2/gem_make.out
Using rack-test 0.6.3
Using mail 2.6.3
Using css_parser 1.3.7
Using sprockets 3.5.2
An error occurred while installing mysql2 (0.3.20), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.20'` succeeds before bundling.
[root@localhost redmine]#

[root@localhost redmine]# mkdir -p /usr/local/lib64/ruby/site_ruby/mysql2
[root@localhost redmine]# cd /usr/local/share/gems/gems/mysql2-0.3.20/ext/mysql2
[root@localhost mysql2]# ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
[root@localhost mysql2]# 



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>