Jake Dyson's picture



# ----------------------------------------
# Credit to Danilo Pires!
# Upgrade Redmine 0.8.4 to 0.9-stable
# ----------------------------------------
# Basically It's his "update-manual" turned into a script for simple copy&paste.
#
# Only real change is to redmine version 0.9-stable
# ----------------------------------------
# edit:
# svn co http://redmine.rubyforge.org/svn/branches/0.9-stable railsapp
# instead of 
# wget -c http://rubyforge.org/frs/download.php/71421/redmine-0.9.5.tar.gz
# (edit is not tested)
# ----------------------------------------
# Advice from Danilo Pires:
# Before beggining - Do the backups (MySQL, Redmine Folder and the
# /var/www/railsapp/files folder that contains all the files added to your projects)
# - For more details search google for mysqldump or even use the Webmin
#   module for MySQL management inside the TurnKey Redmine.
# ----------------------------------------




#1
cd /var/www
svn co http://redmine.rubyforge.org/svn/branches/0.9-stable railsapp
#2
mv railsapp railsappOLD
#3
tar xvfz redmine-0.9.5.tar.gz
#4
mv redmine-0.9.5 railsapp
#5
cp ./railsappOLD/config/database.yml  ./railsapp/config/database.yml
cp ./railsappOLD/config/email.yml  ./railsapp/config/email.yml

#6
# This and the backup-part are not really tested since I did it on a fresh install
cp -r ./railsappOLD/files ./railsapp/files

#7
sudo chown -R root:www-data /var/www/railsapp

#8
cd /var/www/railsapp

#9 (inside the /var/www/railsapp folder)
sudo chown -R www-data:www-data files log tmp

#10 (this command takes a little time - be patient)
gem install rails -v=2.3.5
#11
gem install rack -v=1.0.1
#12 (inside the /var/www/railsapp folder)
rake generate_session_store

#13 (inside the /var/www/railsapp folder)
rake db:migrate RAILS_ENV=production

#14 (inside the /var/www/railsapp folder)
sudo chown -R www-data:www-data files log tmp public/plugin_assets

#15 (inside the /var/www/railsapp folder)
rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production

#16 (inside the /var/www/railsapp folder)
rake db:migrate_plugins RAILS_ENV=production
 
#17
sudo chmod -R 755 files log/ tmp/ public/plugin_assets
 
#18 (inside the /var/www/railsapp folder)
rake tmp:cache:clear

#19 (inside the /var/www/railsapp folder)
rake tmp:sessions:clear

#20 - Restart and enjoy it
sudo reboot