Project

General

Profile

Need help: Redmine 1.2.1 package not compatible with Ubuntu 10.04?

Added by Bernd Vogt about 13 years ago

Hi,

I tried to install Redmine 1.2.1 on Ubuntu 10.04 as described here: HowTo. I have done this before with Redmine 1.2.0 successfully.

When I execute apt-get install redmine redmine-sqlite (Use dbconfig-common: Yes, DB: sqlite3) the following error id thrown:

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!
undefined method `requirement' for #<Rails::GemDependency:0x2ac732645838>

(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
exit: 295: Illegal number: -1
dpkg: error processing redmine (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)

Executing /usr/share/redmine# script/about throws this:

/usr/share/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:81:in `add_load_paths': undefined method `requirement' for #<Rails::GemDependency:0x2b0159cc3eb0> (NoMethodError)
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `each'
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:132:in `process'
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
        from /usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
        from /usr/share/redmine/config/environment.rb:45
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/share/redmine/vendor/rails/railties/lib/commands/about.rb:1
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from script/about:4

Any idea?

Regards,
Bernd


Replies (3)

RE: Need help: Redmine 1.2.1 package not compatible with Ubuntu 10.04? - Added by C D about 13 years ago

I have the same issue, only I'm using MySQL for the database.

A workaround is to comment out the problem line in /usr/share/redmine/vendor/rails/railties/lib/rails/gem_dependency.rb, line 81:

gem self.name, self.requirement # < 1.8 unhappy way

Then re-run rake db:migrate

I have no idea what happens if you comment out that line so be careful... But for me this installed the database for me and redmine loaded up - but all links are broken (could be a permalink issue on my site).

I don't consider this issue fixed though, so if anyone else knows what the problem is please let us know.

[SOLVED] RE: Need help: Redmine 1.2.1 package not compatible with Ubuntu 10.04? - Added by Bernd Vogt about 13 years ago

The problem was caused by an older version of rubygems than required by redmine. After installing Ubuntu and Redmine the rubygems version 1.3.5-1ubuntu2 was installed on my machine. This version is shiped via archive.ubuntu.com.

Workaround

Add a Debian repo to your /etc/apt/sources.list which ships rubygems 1.3.7 and install the new rubygems version or reinstall Redmine.

I found the required rubygems package in http://ubuntu.mirror.cambrium.nl/ubuntu/.

Here my /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu lucid main restricted universe
deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe
deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe
deb http://ubuntu.mirror.cambrium.nl/ubuntu/ maverick main universe
deb http://archive.canonical.com/ lucid partner

Thanks,
Bernd

RE: Need help: Redmine 1.2.1 package not compatible with Ubuntu 10.04? - Added by Brad Jones about 13 years ago

Bernd's solution is great (thanks!) but to explain for folks who may not put the pieces together: The copy of rubygems that is in Maverick is newer than Lucid, and Lucid's copy won't be updated per the usual Ubuntu release cycle. So, you need to add maverick universe into your sources.list file. It doesn't have to be from the mirror he suggests; any will do. You do, however, need to apt-get update after, then run apt-get install -t maverick rubygems, the -t maverick telling apt-get you want to wander off your usual version's repo to get a newer copy.

This wouldn't be necessary except for the fact the provider of the Redmine PPA had trouble getting his copy of Rubygems compiled, so it doesn't install along with the upgraded PPA copy of Redmine. Adding in the Maverick copy of Rubygems effectively replaces the copy you'd been normally getting from the PPA.

Hope that helps.

    (1-3/3)