Gems install failed

Ok again the installation on a naked CentOS 8 because Ruby 2.5.5 can be installed there.
On Debian 9 or CentOS 7 there is only ruby 2.3.x.
I’m getting a little desperate because I don’t understand where the error is.

Steps to reproduce the behavior:

  1. Install Minimal CentOS
  2. yum install ruby
    3, sudo useradd zammad -m -d /opt/zammad -s /bin/bash
  3. cd /opt
  4. sudo wget https://ftp.zammad.com/zammad-latest.tar.gz
  5. sudo tar -xzf zammad-latest.tar.gz -C zammad
  6. chown -R zammad.zammad zammad
  7. sudo su - zammad
  8. gem install bundler rake rails

Here the Error:

[zammad@vmd42762 ~]$ gem install bundler rake rails
Fetching: bundler-2.1.4.gem (100%)
Successfully installed bundler-2.1.4
Parsing documentation for bundler-2.1.4
Installing ri documentation for bundler-2.1.4
Done installing documentation for bundler after 6 seconds
Fetching: rake-13.0.1.gem (100%)
Successfully installed rake-13.0.1
Parsing documentation for rake-13.0.1
Installing ri documentation for rake-13.0.1
Done installing documentation for rake after 0 seconds
Fetching: concurrent-ruby-1.1.6.gem (100%)
Successfully installed concurrent-ruby-1.1.6
Fetching: i18n-1.8.2.gem (100%)

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for ‘config.i18n.fallbacks = true’.
If you’re using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
‘config.i18n.fallbacks = [I18n.default_locale]’.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Successfully installed i18n-1.8.2
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: tzinfo-1.2.6.gem (100%)
Successfully installed tzinfo-1.2.6
Fetching: minitest-5.14.0.gem (100%)
Successfully installed minitest-5.14.0
Fetching: zeitwerk-2.2.2.gem (100%)
Successfully installed zeitwerk-2.2.2
Fetching: activesupport-6.0.2.1.gem (100%)
Successfully installed activesupport-6.0.2.1
Fetching: rack-2.2.2.gem (100%)
Successfully installed rack-2.2.2
Fetching: rack-test-1.1.0.gem (100%)
Successfully installed rack-test-1.1.0
Fetching: mini_portile2-2.4.0.gem (100%)
Successfully installed mini_portile2-2.4.0
Fetching: nokogiri-1.10.8.gem (100%)
Building native extensions. This could take a while…
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.

current directory: /opt/zammad/.gem/ruby/gems/nokogiri-1.10.8/ext/nokogiri

/usr/bin/ruby -r ./siteconf20200220-15540-8gtssq.rb extconf.rb
mkmf.rb can’t find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /opt/zammad/.gem/ruby/gems/nokogiri-1.10.8 for inspection.
Results logged to /opt/zammad/.gem/ruby/extensions/x86_64-linux/2.5.0/nokogiri-1.10.8/gem_make.out
2 gems installed

Ok the same game right now with Ubuntu 18.4
everything as done in the documentary with this result

zammad@vmd42762:~$ gem install bundler rake rails
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /var/lib/gems/2.5.0 directory.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.