Project

General

Profile

Can't install OpenID Connect plugin

Added by Sam RL about 6 years ago

Hi,
I'm trying to achieve a Single Sign-On (SSO) on Redmine via Gluu Server, which uses OpenID Connect for doing so. I'm using Ubuntu 16.04.4 LTS and Redmine 3.2.1.stable. I've found a plugin to use OpenID Connect: https://github.com/devopskube/redmine_openid_connect. I cloned the repository at /usr/share/redmine/lib/plugins, but when I run `bundle exec rake redmine:plugins:migrate RAILS_ENV=production` I get the following errors:

root@samrl:/usr/share/redmine/lib/plugins# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

Caused by:
Gem::LoadError: mysql2 is not part of the bundle. Add it to your Gemfile.
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/rubygems_integration.rb:404:in `block (2 levels) in replace_gem'
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
/var/lib/gems/2.3.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

I've found as a possible solution to add the following lines at my Gemfile (located at /usr/share/redmine/lib/plugins/redmine_openid_connect):
gem 'mysql2', '~> 0.3.18'

But it didn't work. I found that here: https://stackoverflow.com/questions/32457657/rails-4-gemloaderror-specified-mysql2-for-database-adapter-but-the-gem-i
Does anyone know what could be the problem?
Thanks in advance.