0

I'm trying to install the Redmine Agile plugin on a server running Ubuntu 16.04.4. I have a setup with mod_passenger and Apache similar to what's described in this Stack Overflow answer. I seem to be playing error whack-a-mole and have asked a question previously on this. I'm executing these comamnds as www-data.

Here's my console output.

www-data@host:/usr/share/redmine/public/plugins/redmine_agile$ bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
`/home/ubuntu` is not writable.
Bundler will use `/tmp/bundler/home/ubuntu' as your home directory temporarily.
(in /usr/share/redmine)
rake aborted!
NameError: uninitialized constant ActionDispatch::XmlParamsParser
/usr/share/redmine/config/application.rb:55:in `<class:Application>'
/usr/share/redmine/config/application.rb:8:in `<module:RedmineApp>'
/usr/share/redmine/config/application.rb:7:in `<top (required)>'
/usr/share/redmine/Rakefile:4:in `require'
/usr/share/redmine/Rakefile:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

If I try to run the command from /usr/share/redmine per this answer, I get a different error.

www-data@host:/usr/share/redmine/public$ bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
`/home/ubuntu` is not writable.
Bundler will use `/tmp/bundler/home/ubuntu' as your home directory temporarily.
(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)>'
/usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'

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.2/lib/bundler/rubygems_integration.rb:408: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)>'
/usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

In both directories, gem list mysql gives the same output.

www-data@host:/usr/share/redmine/public/plugins/redmine_agile$ gem list mysql

*** LOCAL GEMS ***

mysql2 (0.5.2, 0.4.3)
www-data@host:/usr/share/redmine/public/plugins/redmine_agile$ cd ../..
www-data@host:/usr/share/redmine/public$ gem list mysql

*** LOCAL GEMS ***

mysql2 (0.5.2, 0.4.3)

Here's the Gemfile in the plugin directory.

www-data@host:/usr/share/redmine/public/plugins/redmine_agile$ cat Gemfile
gem "redmine_crm"
gem "mysql2"

How can I resolve this exception and get the agile plugin working? Thanks!

Becca Dee
  • 1,530
  • 1
  • 24
  • 51
  • 1
    I would suggest that you create one local user, add it to apache group, in your virtual host apache file you can configure passenger user to run redmine. And install redmine under that user, first install ruby with rvm... And confirm it works with rails s, after successful installation... – Aleksandar Pavić Feb 27 '19 at 06:31
  • Redmine is already installed and working and ruby is already installed. Should I `sudo apt-get remove redmine redmine-mysql`, then `sudo apt-get install ruby-rvm`? Should I then follow these directions: http://redmine-git-hosting.io/how-to/install-redmine/? Thank you for the reply! – Becca Dee Feb 27 '19 at 20:26
  • Or, at least, follow those instructions for steps one through four, then pick up the Apache instructions from http://www.redmine.org/projects/redmine/wiki/howto_install_redmine_on_ubuntu_step_by_step? – Becca Dee Feb 27 '19 at 20:47
  • Do you think instead it would be sufficient to change the owner of the installation directory of the existing redmine directory to the redmine user? – Becca Dee Feb 27 '19 at 22:00
  • I ended up doing `sudo chown -R redmine:www-data /var/lib/redmine/`, `sudo chown -R redmine:www-data /var/log/redmine/`, `sudo chown -R redmine:www-data /var/lib/redmine/`, and `chown -R redmine:www-data /usr/share/redmine`. Would you mind making your suggestion an answer? I will add the details to that afterwards. – Becca Dee Feb 27 '19 at 22:43
  • Also, which redmine agile plugin? So you installed Redmine by default on ubuntu, just by apt install redmine? – Aleksandar Pavić Feb 28 '19 at 06:23
  • The plugin is the agile plugin by redmineup. Yes, I did `sudo apt-get install redmine redmine-mysql`. (Actually, I removed with leaving the DB in place and then reinstalled, but I don't think that made a difference.) – Becca Dee Feb 28 '19 at 14:19

0 Answers0