The documentation of Redmine describes the upgrade process. I upgraded from Redmine 1.3.1 to Redmine 2.2.2. On an older Ubuntu (10.04.4 LTS) the upgrade steps described in the documentation were not sufficient.
Extract the latest redmine file in your web root. I use a symlink pointing redmine to the latest version. This allows you to keep different version and provides an easy way to switch between versions. You then have to copy the different configuration files (database, configuration) from the ‘old’ setup to the ‘new’ setup. Do not copy the settings.yml file.
cp redmine-1.3.1/config/database.yml redmine/config/ cp -r redmine-1.3.1/files redmine/
The first error message is because of bundle.
rake aborted! no such file to load -- bundler/setup
gem install bundler bundle install
The bundle command failed because of libmagick problems. It was not a requirement for older Redmine versions but without the package (and the libraries) I couldn’t get the upgrade to continue.
checking for Magick-config... no Can't install RMagick 2.13.2. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
apt-get install librmagick-ruby apt-get install libmagick9-dev
Restart the bundle install.
bundle install
Perform the ‘normal’ migration steps.
rake generate_secret_token rake db:migrate RAILS_ENV=production rake redmine:plugins:migrate RAILS_ENV=production rake tmp:cache:clear rake tmp:sessions:clear
Restart Apache (and Passenger). The next error was Ruby (browser) complaining that there was no dispatch file.
no such file to load -- dispatcher
To solve this you have to upgrade Passenger manually.
gem install passenger passenger-install-apache2-module
Change these configuration files
in /etc/apache2/mods-enabled/passenger.load LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_passenger.so in /etc/apache2/mods-enabled/passenger.conf PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19 PassengerRuby /usr/bin/ruby1.8
Restart Apache and Passenger. Log in to Redmine and go to the Administration part and review the roles and configuration.
Have Redmine installed for you
I can help you if you need help installing or maintaining Redmine.
thx. nice write up. a big help~
Thanks for the information. Some of the upgrade docs refer to changing to the mysql2 driver for the database but it worked better leaving it at mysql.
I’m using Ubuntu 12.04 LTS, and I found I needed to install:
apt-get install libmagickwand-dev
…rather than libmagick9-dev, which is no longer included.
Thanks for the write up! Very useful.
ok is helpful!