#gem install rails
#cd /var/www
#mv railsapp railsapp-old
#hg clone --updaterev 2.0-stable https://bitbucket.org/redmine/redmine-all railsapp
#cp railsapp-old/config/email.yml railsapp/config/configuration.yml
#cp railsapp-old/config/database.yml railsapp/config/database.yml
#cp -r railsapp-old/files/ railsapp/files/
#chown -R root:www-data /var/www/railsapp
#cd railsapp
#gem install bundler
#gem install test-unit
#bundle install --without development test rmagick
#mkdir public/plugin_assets
#rake generate_session_store
#rake db:migrate RAILS_ENV=production
If at this point you get an error about the mysql-adapter:
Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile)
Then edit this file:
#vi config/database.yml and change all instances of "adapter: mysql" to "adapter: mysql2".
Then, install the addon:
#gem install activerecord-mysql2-adapter
edit you Gemfile
#vi Gemfile
replace the section:
platforms :mri_18, :mingw_18 do
group :mysql do
gem "mysql"
end
end
with:
platforms :mri_18, :mingw_18 do
group :mysql do
#gem "mysql"
gem "mysql2", "~> 0.3.11"
end
end
then run this again and hopefully it should work:
#rake db:migrate RAILS_ENV=production
chown -R www-data:www-data files log tmp public/plugin_assets
rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production
If you find this errors with: "don't know how to build task 'db:migrate:upgrade_plugin_migrations'".
then use this instead:
#rake redmine:plugins:migrate RAILS_ENV=production
this next one may error, ignore it if it does
#rake db:migrate_plugins RAILS_ENV=production
#chmod -R 755 files log/ tmp/ public/plugin_assets
#rake tmp:cache:clear
#rake tmp:sessions:clear
References:
http://www.turnkeylinux.org/forum/general/20120722/guide-how-upgrade-redmine-latest-version-203-painlessly
http://www.redmine.org/boards/2/topics/33504
redmine
© 2005-2024 Craig Mayhew