You are here
INTRODUCTION
This is a short tutorial of the Turnkey Redmine Update. It is probably not a perfect tutorial because it is my first one, so please excuse my errors or my bad grammar.
I'm not native english.
If you have any questions or suggestions, please let me now in the comment section below.
PRECONFIGURATION
First of all we need to make sure we have the newest version of the linux/debian machine to have a secure installation.
TIP: Make sure you reboot the system after each installation or update to make sure that the changes were made successfully.
apt-get update
- downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all enabled repositories and PPAs.
apt-get upgrade
- will fetch new versions of packages existing on the machine if APT knows about these new versions by way of
apt-get update
Before I continued with the installation of Ruby and Ruby on Rails I first made a change tot he .bashrc file located in your root folder. I think the RVM (Ruby Version Manager) will have problems if you don’t change the path, so therefore I changed the following line in the .bashrc file:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- This is the original line that causes the error message when you install RVM.
Just write "$PATH:" after the equal sign, which will look something like this:
PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
You can also do this after the RVM installation, it will just warn you to do so.
RVM Installation
Ruby Version Manager is a very effective tool to install the latest versions of Ruby and Ruby on Rails and made my life a lot easier.
Follow these steps:
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 \curl -sSL https://get.rvm.io | bash -s stable
If your terminal doesn’t recognize the curl, then this means it’s not installed yet, just do gem install curl and run the command above again.
Now we have installed RVM successfully. Time to install the latest versions of Ruby and Ruby on Rails.
\curl -sSL https://get.rvm.io | bash -s stable --ruby \curl -sSL https://get.rvm.io | bash -s stable –rails
If you want to see the version you have installed use ruby –v
or rails –v
.
In case you don’t want the latest version, maybe a specific version for ruby or rails, then just run the same command but append the version at the end. E.g.
\curl -sSL https://get.rvm.io | bash -s stable --ruby=1.9.3
To make sure we use this version just type
rvm use <ruby version>
- E.g. to use v1.9.3:
rvm use 1.9.3
rvm --default use < ruby version>
Now you will use the selected version as default. I would suggest now to reboot the system.
Passenger and mysql2 installation
I am not exactly sure if you need to update passenger and mysql2 for your new Redmine, but in my case it was essential.
What you should also do is go into your public folder where your Redmine is installed.
cd var/www gem install passenger passenger-install-apache2-module
During this installation you will receive instructions in the terminal that tells you what to change in apache2 config file (path /etc/apache2/apache2.conf
). In addition, you need to edit the given path in the passenger.config which you can find in /etc/apache2/config.d/passenger.config
.
To finish the installation reload the apache server.
/etc/init.d/apache2 reload
Now we update the mysql to mysql2:
gem install mysql2
After this you need to open your database.yml in /var/www/redmine/config/database.yml
and change every "mysql" to "mysql2".
Reboot the system.
REDMINE INSTALLATION
These steps will upgrade the redmine:
cd /var/www mv railsapp railsapp-old hg clone --updaterev 2.6-stable https://bitbucket.org/redmine/redmine-all railsapp cp railsapp-old/config/configuration.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 chown -R www-data:www-data files log tmp public/plugin_assets rake generate_secret_token rake db:migrate RAILS_ENV=production rake redmine:plugins:migrate RAILS_ENV=production chmod -R 755 files log/ tmp/ public/plugin_assets rake tmp:cache:clear rake tmp:sessions:clear
Check now if the version has been upgraded with:
/var/www/railsapp/script/about
Reboot the system and that’s it!
RESOURCES
http://www.turnkeylinux.org/forum/general/20120722/guide-how-upgrade-red...
https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html
Target version?
Just to be clear, what is the version of the TurnKey Redmine App you are upgradeing, and what version of Redmine are you upgrading to? It looks like your target is 2.0-stable. Current TKL version (v13) I think is 2.2.3 that is why I asked.
Regards,
Ken
":0)
http://www.github.com/DocCyblade
Well I upgraded from version
Well I upgraded from version 1.4.4 to 2.6.0 stable but it should work for any version above 2.0
dsudo
Ruby Problems
I have two problems with the upgrade process so far, and they prevent me from continuing past the ruby and rails install.
Problem number two goes away when I subtract the space in the example, "PATH=$PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" to read "PATH=$PATH:/usr/local/..."
But I still have path problems when trying to run rvm use 2.2.0. I get this error.
"Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.2.0/bin' is not available,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.2.0'."
Is there an easy way to get around this? Should this guide be edited to show how to make this work, or am I missing some basic ruby stuff?
Sorry can't help ATM
I have to rush and I'm not in a position to give a proper answer ATM but it sounds like you have solved your point 2, although it sounds like you might need to make some more adjustments to PATH to get things working properly.
I have just edited the OP to tidy it up a little and I'm not totally convinced of the suggestions that is made re editing the PATH. I suspect that, that is not quite right and instead of adding PATH to itself that you may need to add the Ruby path (like it suggests in the error - perhaps try googling that?)...
When I get a chance I will sit down and run through this to make sure it works on a vanilla TKL Redmine v13.0 instance... In the meantime if you have any succes or even more progress, please post! It will also be a reminder to me to get back to this!
If only it were that simple...
Whilst on face value it sounds simple; for us we have over 100 images in multiple formats to update and test... Believe you me that's a BIG job! And we are a small team with limited resources and a ton of other (behind the scenes) stuff to take care of.
But if that means that you're volunteering to help out that'd be super awesome! :p
You'll find the TurnKey Redmine appliance build code here and the TKLDev docs here.
I still won't be able to guarantee a release date, but I can guarantee it will be sooner if we get some help! :)
Thanks for reporting
It's good to know that the TKLDev build code for Redmine only needs a slight tweak to update.
Assistance please
Hi!
I am trying to upgrade Redmine by following this post. I have not used TKL before, we are currently using a Bitnami Redmine VM but I would like to see if TKL is a better solution before we upgrade to the latest Redmine version.
I am following the first post in this thread and I am now struck here:
This is the contents of /etc/apache2
As you can see I dont have a config.d directory and I can't seem to find passenger.config anywhere.
I also don't know how to edit the file when I find it.
Thanks !
Updated (v14.0) Redmine appliance on it's way
Great!
It's a great news Jeremy, thank you.
really?
that is very difficult....i don't know how to do it
Add new comment