'redmine' 'redmine-mysql' fail to install with 'ruby' (1.9.3)

Bug #1240705 reported by Pascal A.
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
redmine (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,

To sum things up, I think the 'redmine' 2.3.1-1 package is not compatible with 'ruby' (indirectly the latest 'ruby1.9.1' 1.9.3.194-8.1ubuntu2), but only with the older 'ruby1.8' (1.8.7.358-7ubuntu2) , which doesn't match with the 'redmine' package dependencies at the moment.

System:
---
$ lsb_release -rd
Description: Ubuntu 13.10
Release: 13.10
$ sudo apt-cache policy redmine
redmine:
  Installed: 2.3.1-1
  Candidate: 2.3.1-1
  Version table:
 *** 2.3.1-1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status
---

Supposed-expected and actual:
---
Expected: install succeeds and '/etc/redmine/default/database.yml' contains 'adapter: mysql2'
Actual: install fails (E: Sub-process /usr/bin/dpkg returned an error code (1)), and '/etc/redmine/default/database.yml' contains 'adapter: mysql'
---

Going into details, I meet this error when 'sudo aptitude install redmine redmine-mysql' on Saucy 13.10:
---
Creating config file /etc/redmine/default/session.yml with new version
A new secret session key has been generated in /etc/redmine/default/session.yml
Populating database for redmine instance "default".
This may take a while.
rake aborted!
Please install the mysql adapter: `gem install activerecord-mysql-adapter` (cannot load such file -- mysql)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
dpkg: error processing redmine (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin ...
Errors were encountered while processing:
 redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)
---

Looking for the 'redmine' and 'activerecord-mysql-adapter' keywords on the web sent me there:
---
http://stackoverflow.com/questions/9609985/please-install-mysql-adapter-gem-install-activerecord-mysql-adapter
http://www.redmine.org/projects/redmine/wiki/RedmineInstall (look for the "Example for a MySQL database using ruby 1.9 (adapter must be set to mysql2)" pattern in this one)
---

And indeed, before purging the failed install, here is the '/etc/redmine/default/database.yml' content:
---
$ sudo cat /etc/redmine/default/database.yml
production:
  adapter: mysql
  database: redmine_default
  host: localhost
  port:
  username: redmine
  password:
  encoding: utf8
---

By the way, I'm still a linux rookie, and an erroneous packages management on my side could be the cause.

Here is my install context:
---
1/ initial install: Raring 13.04, in a virtualbox guest with snapshots taken after each successfull configuration or before each unmastered one
2/ 'redmine' install through repositories
3/ flawless (it seems) upgrade to Saucy 13.10, including the 'redmine' upgrade, in order to have more ruby1.9.3-related dependencies
4/ purge of 'redmine', in order to purge 'ruby' 1.8 and upgrade it to 1.9.1 (1.9.3.194-8.1ubuntu2), for a manual gitlab install without having to 'gem install' but installing 'ruby-charlock-holmes' from repositories
5/ flawless manual install of gitlab, relying on the repositories ruby 1.9.1 (1.9.3.194-8.1ubuntu2)
6/ failed new install of redmine
---

So I try to only install ruby1.9.1-related packages only, not to mess up with its 1.8 version, but it doesn't seem to be possible, since the 'redmine' package, and the 'libapache2-mod-passenger' also, both have some ruby1.8 dependencies.

Feel free to ask me more useful info if needed: I stay tuned :) Thanks for free software

Revision history for this message
Pascal A. (pascalav) wrote :
Download full text (16.5 KiB)

After purging all ruby, rails, rake and apache2 mod passenger installs, all from ubuntu repositories, then purging redmine and ensuring the database and its user are deleted, plus a reboot, I went on a new install.

I got the exact same error, which demonstrates that the 'redmine' package indeed brings ruby 1.9.3 with him (dependency), and that the 'adapter: mysql' found in the '/etc/redmine/default/database.yml' config file is erroneous (should be 'adapter: mysql2' for the reason stated in the initial bug report message).

---
$ sudo apt-get install redmine-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bundler libev4 libfcgi-ruby1.9.1 libruby1.8 libruby1.9.1 rake redmine ruby
  ruby-actionmailer-3.2 ruby-actionpack-3.2 ruby-activemodel-3.2
  ruby-activerecord-3.2 ruby-activeresource-3.2 ruby-activesupport-3.2
  ruby-arel ruby-blankslate ruby-builder ruby-coderay ruby-dev ruby-erubis
  ruby-eventmachine ruby-fastercsv ruby-hike ruby-hmac ruby-i18n ruby-journey
  ruby-mail ruby-mime-types ruby-multi-json ruby-mysql2
  ruby-net-http-persistent ruby-net-ldap ruby-openid ruby-passenger
  ruby-polyglot ruby-rack ruby-rack-cache ruby-rack-openid ruby-rack-ssl
  ruby-rack-test ruby-rails-3.2 ruby-railties-3.2 ruby-sprockets ruby-thor
  ruby-tilt ruby-treetop ruby-tzinfo ruby-yajl ruby1.8 ruby1.8-dev ruby1.9.1
  ruby1.9.1-dev rubygems rubygems-integration
Suggested packages:
  ruby-rmagick bzr cvs darcs mercurial subversion ri ruby-bcrypt rails
  ruby-passenger-doc treetop ruby1.8-examples ri1.8 ruby-switch
  ruby1.9.1-examples ri1.9.1 graphviz
The following NEW packages will be installed:
  bundler libev4 libfcgi-ruby1.9.1 libruby1.8 libruby1.9.1 rake redmine
  redmine-mysql ruby ruby-actionmailer-3.2 ruby-actionpack-3.2
  ruby-activemodel-3.2 ruby-activerecord-3.2 ruby-activeresource-3.2
  ruby-activesupport-3.2 ruby-arel ruby-blankslate ruby-builder ruby-coderay
  ruby-dev ruby-erubis ruby-eventmachine ruby-fastercsv ruby-hike ruby-hmac
  ruby-i18n ruby-journey ruby-mail ruby-mime-types ruby-multi-json ruby-mysql2
  ruby-net-http-persistent ruby-net-ldap ruby-openid ruby-passenger
  ruby-polyglot ruby-rack ruby-rack-cache ruby-rack-openid ruby-rack-ssl
  ruby-rack-test ruby-rails-3.2 ruby-railties-3.2 ruby-sprockets ruby-thor
  ruby-tilt ruby-treetop ruby-tzinfo ruby-yajl ruby1.8 ruby1.8-dev ruby1.9.1
  ruby1.9.1-dev rubygems rubygems-integration
0 upgraded, 55 newly installed, 0 to remove and 0 not upgraded.
Need to get 9 000 kB/18,0 MB of archives.
After this operation, 63,5 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://fr.archive.ubuntu.com/ubuntu/ saucy/main libruby1.9.1 amd64 1.9.3.194-8.1ubuntu2 [4 105 kB]
Get:2 http://fr.archive.ubuntu.com/ubuntu/ saucy/main ruby1.9.1 amd64 1.9.3.194-8.1ubuntu2 [37,2 kB]
Get:3 http://fr.archive.ubuntu.com/ubuntu/ saucy/main libruby1.8 amd64 1.8.7.358-7ubuntu2 [1 789 kB]
Get:4 http://fr.archive.ubuntu.com/ubuntu/ saucy/main ruby1.8 amd64 1.8.7.358-7ubuntu2 [34,4 kB]
Get:5 http://fr.archive.ubuntu.com/ubuntu/ saucy/universe ruby-i18n all 0.6.4-1 [39,9 kB]
Get:6 ht...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redmine (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Monahan (cobra-v) wrote :

Please see ticket #1239686 for related issues.

Revision history for this message
da6930p (da6930p) wrote :

Any solutions?

Revision history for this message
hicolour (marek-prochera) wrote :

 when the installer fail change

sudo cat /etc/redmine/default/database.yml

adapter from msyql to mysql2 and re run

sudo apt-get install redmine redmine-mysql

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.