Redmine

=Introduction=

Motivation
I have had installed redmine 1.0.1 on gentoo some weeks ago. The last days I have tested the guidelines for redmine on tomcat using jruby but without success end up with a dead redmine installation on my machine. On another machine redmine 1.1.1 is working with mongrel like a charm. Therefore I have unmerged all my redmine related packages to start a new installation from scratch. The version 1.0.1 don't exist anymore on portage therefore this is the chance to make an wiki article on that topic.

Basics of ruby and rubygems inside gentoo
Redmine is a ruby based package. Ruby also have a package manager named "gem" or "gems" or "rubygems". This is available under "rubygems" within gentoo. The following command will install version of a package using "rubygems": You can also left the version option. This will install the latest version available. But be aware - the compatibility hell is waiting for you. Mostly an exact version of a package is needed. But it is possible to install more versions side by side. My suggestion is to using the gentoo emerge command whenever possible meaning this package is available as an ebuild. Versions are managed better. But there is a difference between both methods: gem will install the files in directory /usr/ local /lib/ruby/gems/1.8/gems/. Gentoo will install the files in directory /usr/lib/ruby/gems/1.8/gems/. You can check all your installed packages after "gem install" or "emerging" - that's make no difference with:

Basics of redmine
Please first have a look at installation instructions on redmine.org. There are listed the compatibility requirements for "Ruby", "Ruby on Rails" and "Rack" - the main packages to install and some other packages like "Rake", "i18n" and "RubyGems". Now take a look at the available redmine packages: emerge -pv redmine This show that no package is unmasked yet. Therefore I will use the latest available package "www-apps/redmine-1.1.2".

=redmine 1.1.2 (now the older version, but example for fresh installation)=

Dependencies
ruby =1.8.6 or =1.8.7; Rails =2.3.5; Rack =1.0.1; RubyGems >=1.3.1 < 1.5.0; Rake >=0.8.3; I18n =0.4.2

unmask redmine
!!! One of the following masked packages is required to complete your request: - www-apps/redmine-1.1.2 (masked by: ~amd64 keyword)

unmask coderay
Show what to do:

!!! One of the following masked packages is required to complete your request: - dev-ruby/coderay-0.9.7 (masked by: ~amd64 keyword)

unmask i18n
Show what to do:

!!! One of the following masked packages is required to complete your request: - dev-ruby/i18n-0.4.2 (masked by: ~amd64 keyword)

unmask ruby-net-ldap
Show what to do:

!!! One of the following masked packages is required to complete your request: - dev-ruby/ruby-net-ldap-0.0.4-r1 (masked by: ~amd64 keyword)

check further dependencies (DataBase)
Show what to do:

These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N    ] dev-lang/ruby-1.8.7_p334  USE="berkdb gdbm ipv6 ncurses readline ssl -debug -doc -examples -libedit -rubytests -socks5 -threads -tk -xemacs" 0 kB                [ebuild  N    ] dev-ruby/rubygems-1.3.7-r1  USE="-doc -server" RUBY_TARGETS="ruby18 -jruby -ree18" 0 kB                                                                          [ebuild  N    ] dev-ruby/rack-1.0.1  USE="-doc" 0 kB [ebuild  N    ] dev-ruby/i18n-0.4.2  USE="-test" RUBY_TARGETS="ruby18 -jruby -ree18" 0 kB [ebuild  N    ] dev-ruby/ruby-net-ldap-0.0.4-r1  USE="-test" RUBY_TARGETS="ruby18 -jruby -ree18" 0 kB [ebuild  N    ] dev-ruby/rmagick-2.13.0-r1  USE="-doc -test" RUBY_TARGETS="ruby18" 0 kB [ebuild  N    ] dev-ruby/coderay-0.9.7  USE="-doc -test" RUBY_TARGETS="ruby18 -jruby -ree18 (-ruby19)" 0 kB                                                                      [ebuild  N    ] dev-ruby/activesupport-2.3.5  USE="-doc" 0 kB [ebuild  N    ] dev-ruby/activerecord-2.3.5  USE="-doc -mysql -postgres -sqlite -sqlite3" 0 kB [ebuild  N    ] www-apps/redmine-1.1.2  USE="imagemagick -cvs -darcs -fastcgi -git -mercurial -mysql -openid -passenger -postgres -sqlite3 -subversion -test" RUBY_TARGETS="ruby18" 4,717 kB

That looks nice. Your output should match the dependencies listed some lines above. "Rails" and "Rake" are not listed at the moment. We will come back later to this problem (bug?). In my case I prefere to use mysql DB for redmine. But you can try also another (look at instructions for databases). In my case I have to set the use flag for redmine and activerecord (you can check this by yourself after set the use flag of redmine only).

Now the output of "emerge -pv redmine" add some further package(s) like "mysql-ruby" in my case and delete the minus before mysql use flag.

install redmine
Now we are on the road to install redmine.

The last message after emerge show the initial configuration instructions. We have to do this.

In my case an error occur see bug report. The important message is: ruby18: No such file or directory -- rake (LoadError) Solve this issue with

Listing all gems looks in my case like that:

*** LOCAL GEMS *** activerecord (2.3.5) activesupport (2.3.5) coderay (0.9.7) i18n (0.4.2) mysql (2.8.2) rack (1.0.1) rake (0.8.7) rmagick (2.13.0) ruby-net-ldap (0.0.4)

initial configuration and start of redmine
After configurations for your database listed at redmine.org start your redmine with webrick as test server and login with Login: admin, Password: admin.

=Update to redmine 1.3.0=

Check requirements
!!! One of the following masked packages is required to complete your request: - www-apps/redmine-1.3.0 (masked by: ~amd64 keyword)

Update version in keyword file
At the moment only redmine is masked. All other ~amd64 keys for redmine 1.1.2 (see obove) can be removed.

Update use flags
Redmine 1.3.0 has no use flag for 'mysql' anymore. Therefore only mysql flag (or other database) for activerecord is needed. Line with redmine can be deleted.

Fix file updates
Looking for files to update and merge your content in the newer one.

Migrate database
Now you are ready to start the new version of redmine like the old one before.

=Update to redmine 1.4.3 (latest)=

Check requirements
These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild    U ~] dev-ruby/coderay-1.0.6 [1.0.4] [ebuild    U ~] www-apps/redmine-1.4.3 [1.3.0] USE="-ldap%" The following keyword changes are necessary to proceed: =dev-ruby/coderay-1.0.6 ~amd64 =www-apps/redmine-1.4.3 ~amd64
 * 1) required by www-apps/redmine-1.4.3[ruby_targets_ruby18], required by redmine (argument)
 * 1) required by redmine (argument)

Update version in keyword file
At the moment only redmine and coderay is masked. All other ~amd64 keys for redmine 1.1.2 (see obove) can be removed.

Fix file updates
Looking for files to update and merge your content in the newer one.

Start of redmine and trouble without ldap use flag
On start of redmine an error occurs. no such file to load -- net/ldap/dn (MissingSourceFile)

Quick fix is to add the keyword for "ruby-net-ldap" and enable the ldap use flag permanently or temporarily at emerge.

If you have ruby18 and ruby19 targets, you will need to force ruby18 - else ruby-net-ldap will fail. die "Unable to generate gemspec file.";

=Important links= http://www.redmine.org/projects/redmine/wiki/redmineinstall

=Useful links= This had killed my last redmine-1.0.1 installation: I recommend to backup your datas before using new plugins!
 * http://www.gentoo.org/doc/en/mysql-howto.xml
 * http://blog.scherbaum.info/2009/01/28/redmine-installation-unter-gentoo for using mongrel and init script (German)
 * http://www.nerdlabor.de/server/wie-installiere-ich-redmine-auf-lighttpd-mit-fastcgi for using lighttpd (German)
 * http://blog.josefsson.org/2008/10/17/redmine-on-debian-lenny-using-lighttpd using lighttpd on debian
 * http://howto.landure.fr/gnu-linux/debian-4-0-etch-en/install-the-redmine-project-management-application-on-debian-4-0-etch using lighttpd on debian
 * http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
 * http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_in_Apache_Tomcat
 * http://www.redmine.org/projects/redmine/wiki/PluginList
 * http://www.redminebacklogs.net/