noshutdown-ru / vault

Is a plugin for project management system Redmine. Allows you to store various passwords/keys in one place for the project.
https://noshutdown.ru/en/redmine-plugins-vault
46 stars 29 forks source link

Installation error on Redmine 4.2.0 #74

Open wcdit-dev opened 3 years ago

wcdit-dev commented 3 years ago

There is an issue during the plugin installation on Redmine 4.2.0. The error occurs after running the command: bundle install --without development test . Here is an error log:

============ LOG STARTS HERE ============ [DEPRECATED] The --without flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use bundle config set without 'development test', and stop using this flag [DEPRECATED] Your Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config set disable_multisource true. The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32. The dependency ffi (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32. Fetching gem metadata from https://rubygems.org/.......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Using rake 13.0.3 Using concurrent-ruby 1.1.8 DEPENDENCY LOGS HERE Using roadie-rails 2.2.0 Using activestorage 5.2.5 Using rails 5.2.5 Installing iconv 1.0.8 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/local/bundle/gems/iconv-1.0.8/ext/iconv /usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r ./siteconf20210425-172-vfyiui.rb extconf.rb checking for rb_enc_get() in ruby/encoding.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}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/$(RUBY_BASE_NAME) --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --enable-config-charset --disable-config-charset --with-config-charset --without-config-charset /usr/local/lib/ruby/2.7.0/mkmf.rb:471:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.7.0/mkmf.rb:564:intry_link0' from /usr/local/lib/ruby/2.7.0/mkmf.rb:582:in try_link' from /usr/local/lib/ruby/2.7.0/mkmf.rb:794:intry_func' from /usr/local/lib/ruby/2.7.0/mkmf.rb:1083:in block in have_func' from /usr/local/lib/ruby/2.7.0/mkmf.rb:971:inblock in checking_for' from /usr/local/lib/ruby/2.7.0/mkmf.rb:361:in block (2 levels) in postpone' from /usr/local/lib/ruby/2.7.0/mkmf.rb:331:inopen' from /usr/local/lib/ruby/2.7.0/mkmf.rb:361:in block in postpone' from /usr/local/lib/ruby/2.7.0/mkmf.rb:331:inopen' from /usr/local/lib/ruby/2.7.0/mkmf.rb:357:in postpone' from /usr/local/lib/ruby/2.7.0/mkmf.rb:970:inchecking_for' from /usr/local/lib/ruby/2.7.0/mkmf.rb:1082:in have_func' from extconf.rb:8:in

'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/usr/local/bundle/extensions/x86_64-linux/2.7.0/iconv-1.0.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/iconv-1.0.8 for inspection. Results logged to /usr/local/bundle/extensions/x86_64-linux/2.7.0/iconv-1.0.8/gem_make.out

An error occurred while installing iconv (1.0.8), and Bundler cannot continue. Make sure that gem install iconv -v '1.0.8' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: iconv ============ LOG ENDS HERE ============

Attaching a docker-compose config for easier error reproducement.

============ DOCKER COMPOSE STARTS HERE ============ version: '3.1'

services:

redmine: image: redmine:4.2.0 ports:

  • 8080:3000 depends_on:
  • db environment: REDMINE_DB_MYSQL: db REDMINE_DB_PASSWORD: example REDMINE_SECRET_KEY_BASE: supersecretkey

    db: image: mysql:5.7 environment: MYSQL_ROOT_PASSWORD: example MYSQL_DATABASE: redmine

============ DOCKER COMPOSE STARTS HERE ============

UPD: the same issue on versions 4.0.8 and 4.1.2

noshutdown-ru-user commented 3 years ago

we will check

osman-ametov commented 3 years ago

the same issue

noshutdown-ru-user commented 3 years ago

Should be fixed in 0.4.2 version, pull latest master branch version, and retry.

wcdit-dev commented 3 years ago

Should be fixed in 0.4.2 version, pull latest master branch version, and retry.

Unfortunately the issue still exists on 0.4.2. Try using the provided docker-compose file to test the solution please.

noshutdown-ru-user commented 3 years ago

ok, let us check

noshutdown-ru-user commented 3 years ago

/usr/local/lib/ruby/2.7.0/mkmf.rb:471:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.7.0/mkmf.rb:564:in try_link0' from /usr/local/lib/ruby/2.7.0/mkmf.rb:582:in try_link' from /usr/local/lib/ruby/2.7.0/mkmf.rb:794:in try_func' from /usr/local/lib/ruby/2.7.0/mkmf.rb:1083:in block in have_func' from /usr/local/lib/ruby/2.7.0/mkmf.rb:971:in block in checking_for'

You missing development tools probably for iconv, we using our vagrant project to test redmine and our plugins. You can check https://github.com/noshutdown-ru/vagrant_redmine. Probably you missed something from this https://github.com/noshutdown-ru/vagrant_redmine/blob/master/playbook.yml#L19-L29

wcdit-dev commented 3 years ago

Well, we've tried setting up the plugin on a web server (not via docker but natively) and still we can't get it working. Is it possible to get the working version of plugin without vagrant etc just by following the set up instructions? :smiley:

Or maybe there may be another instruction for our case (I bet we're not the only team who faced this issue) :thinking:

noshutdown-ru-user commented 3 years ago

To help you we need to know what actually you did. In playbook.yaml we have installed all necessary components. Pls check that they installed on your server or paste detailed logs. Without that it is super hard to troubleshoot and help you

peroda commented 3 years ago

the same issue with redmine 4.2.1