Upgrade Redmine version from 2.5 to 3.1

RedmineRedmine express upgrade guide from Redmine 2.5 to Redmine 3.1 for older article Debian Wheezy 7 with Apache/2.2.x, 10.0.x-MariaDB, PHP 5.4.4 (DSO) backend without loaded SCM.

This article continues from previous tutorial Redmine 2.5 installation guide on Debian Wheezy with MariaDB.

First you need to have supported version of Ruby previously we have installed Redmine 2.5 with Ruby 2.0.0 version which is still supported so we can easily upgrade to current 3.1 version.

Here are steps how to upgrade from Redmine 2.5.x to actual Redmine 3.1.x:

$ sudo -i
# rvm list known
# rvm get stable
- Here can be problem with public key = add it with sudo gpg command...

# cd /opt/redmine/current
# svn info
- Here can be problem with public/plugin_assets folder = move content of plugin_assets to temporary location then remove plugin_assets folder, run svn switch and move back content to newly created folder from svn
# svn switch http://svn.redmine.org/redmine/branches/3.1-stable
# chown -R www-data:www-data files log tmp public/plugin_assets
# svn info

# rm Gemfile.lock
# bundle install

# bundle exec rake db:migrate RAILS_ENV=production
# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
# bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
# service apache2 restart

Description of whole process:

First you need to have supported version of Ruby previously we have installed Redmine 2.5 with Ruby 2.0.0 version which is still supported so we can easily upgrade to current 3.1 version.

We have upgraded RVM. Then we switched SVN branch from 2.5-stable to 3.1-stable where were immediately updated newly added/modified files from Redmine Repo. If there was problem with folder named plugin_assets, we moved whole content (if there was something) to another temporary location, removed plugin_assets folder and again switched SVN branch from 2.5-stable to 3.1-stable, then moved content from temporary location back to newly created plugin_assets folder. After we chowned folder for apache because folders should be writeable. There can be problems with dependencies of Gem named Rack which is saved in Gemfile.lock. To be sure we removed Gemfile.lock and started bundle install which installed necessary compatible Gems which are needed for Redmine 3.1.x. Needed version of Rails was upgraded by bundle install from 3.2 to 4.2 which is supported by current Redmine 3.1.
After Gems are updated we run upgrade of DB and upgrade of Plugins (exec rake db:migrate, exec rake redmine:plugins:migrate). We cleared temporaty files and sessions (exec rake tmp:cache:clear tmp:sessions:clear). Last we restart passenger (apache2 server).
Check any new permissions If there was some upgrade in new version in Administration > roles and permissions.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.