December 29, 2009

Updating redmine and changing from mongrel to passenger

The support server at the office has been using redmine for a few years. When I set it up way back in the days it was configured to use a mongrel cluster behind an apache server. This setup has been great, lately it has started to show it's age. Sometimes a mongrel would get stuck, eventually the others would suffer the same fate, and the server wouldn't process anymore requests. So now that the holiday season is in effect I'm taking advantage of the lighter traffic to update the server.

Since this isn't a brand new install I'm taking a different track than most other redmine installs. And I've found upgrading to be more fraught with problems than a clean install. This is a production machine so in addition to normal backups I have to be cautious of breaking shit irreparably.

So let's get to work:
After logging in the update your gems

gem update --system

Depending on the version of redmine you are using you will need to update your rails accordingly.

bash#: rails --version
Rails 2.2.2

According to the redmine News page 0.9 uses Rails 2.3.5 so now is a good time to update the rest of your gems
gems update

Then download the redmine updates
cd /var/redmine/
svn update

In my case I've made some customization to the code and this sometimes conflicts with the update. You can monitor this by looking for 'C' in the left column while svn update is running.

If it isn't done so you should install passenger

gem install passenger

As I mentioned before, redmine was running through a rails mongrel cluster. Now I'm moving it to passenger and apache. After passenger is installed it is time to build it into apache

bash: redmine# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module insaller, v2.2.8.
This installer will guide you through the entire installation process. It shouldn't take
more than 3 minutes in total.

At the end it will ask you to add the module to the apache configuration file. We won't be doing that. Instead we will make a module file and use the a2enmod.

bash:redmine# nano /etc/apache2/mods-available/passenger.load

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.8/ext/apache2/
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.8
PassengerRuby /usr/bin/ruby1.8

Ctrl-O and Ctrl-X to save and quite. Then
bash: redmine# a2enmod passenger
Module passenger installed; run /etc/init.d/apache force-reload to enable.

Finally, update your redmine database:

bash: redmine# RAILS_ENV=production rake db:migrate
bash: redmine# RAILS_ENV=production rake db:migrate_plugins

Modify your vhost.conf file to point the DocumentRoot to the redmine/public folder (mine was just pointing to the redmine root) and then run the apache force-reload command.

If you have anything like webrick or mongrels running it is alright to terminate them now. Point your browser to your redmine site and bask in your awesomeness :-)

Posted by yardie at 1:34 PM | Comments (0) | TrackBack

December 21, 2009

Things I've discovered today

I've downloaded, installed and used the Mono project IDE on my Mac. Compared to the last time I tried it many years ago it's not so bad. I created a small Windows application and the debugger was able to start and display the window. I'm not sure how much support for Windows Forms it provides but this would be to develop cross-platform applications.

Favicon from Pics
It's a site that you upload a picture and it creates a favicon for your site. I'm not a graphic designer or artist so this is great for taking some photos and graphics I have and make it into something useful.

Pictory Magazine
An online photo magazine with user submitted photos and stories.

A blog that I found while googling for something else and has impressed me with the content and usefullness of the posts.

Posted by yardie at 7:19 PM | Comments (0) | TrackBack

December 5, 2009

One last thing

I finally got off my ass and set the blog back up again. Lot's of security changes and permissions to set and reset. Now I've got the one little headache of fixing my CSS. I've never been able to get it just right when using blogging software like movabletype. I guess the translation from internal system tags to real html tags caused a breakdown because what I wrote was not what got published.

This weekend is looking pretty miserable (Paris is cold rainy, and quite depressing this time of year) so I'll take the time to do some home improvement, clean out the media library and play with my blog.

Posted by yardie at 2:14 PM | Comments (0) | TrackBack

December 2, 2009

Things have turned around

Well it's taken a little while but I finally took the blog out of storage. Found a new host and now I'm back and blogging. The server has been upgraded from a little duty shared hosting service to a medium duty VPS. Expect to see more as time goes on.

It's far from the end my friend.

Posted by yardie at 7:25 PM | Comments (0) | TrackBack