How to MANUALLY install Redmine 3.x on Windows Server 2008 R2

redmine_logo_v1  Redmine is a free and open source, web-based project management and issue tracking tool. It allows users to manage multiple projects and associated subprojects. It features per project wikis and forums, time tracking, and flexible role based access control. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. Redmine integrates with various version control systems and includes a repository browser and diff viewer. The design of Redmine is significantly influenced by Trac, a software package with some similar features. Redmine is written using the Ruby on Rails framework. It is cross-platform and cross-database and supports at least 34 languages.

There are issues with installing Redmine on Windows due to some gems. The key to a successful outcome is to match the versions. Obviously with time this situation will change…

This ‘should’ take < 30 minutes.

You can always use the Web Platform Installer process. Google/Bing/etc. will help you find it.

You WILL experience a Json gem error around step 4.3 – just keep following the directions.

IGNORE “DL is deprecated, please use Fiddle”


  • You have IIS up and running
  • You already have an instance in place of SQL, MAriaDB, POST/My etc
  • Rmagick is NOT being/already installed.

Download the following:

  • Ruby 2.0.0 x32 –
  • Ruby Dev Kit for use with 2.0 x32 –
  • Redmine 3.0.4 –

‘THE’ Process

  1. Install Ruby. Just double click, agree, and accept the defaults.
  2. Create the IIS site that will host Redmine.
  3. Extract the Redmine file into the above IIS site folder. Let us assume it shall be C:\inetpub\wwwroot\redmine\
  4. Open a Ruby Command prompt as Administrator. Capture1
    1. CD into the folder C:\inetpub\wwwroot\redmine\ and run
    2. gem install bundler
    3. bundle install –without development test rmagick
  5. Install the Dev Kit
    1. Double click and extract to a folder that makes sense. E.g. C:\RubyDevKit
    2. CD into that folder and run:
      • ruby dk.rb init
      • ruby dk.rb install
      • gem install json -v ‘1.8.3’
  6. Go back to C:\inetpub\wwwroot\redmine\ and run
    • bundle install –without development test rmagick
    • bundle exec rake generate_secret_token
    • rake db:migrate – IF you get a SQL error here you probably have the wrong PW in your C:\inetpub\wwwroot\redmine\config\database.yml file OR your user is different.
    • set RAILS_ENV=production
    • set REDMINE_LANG=en
    • bundle exec rake redmine:load_default_data
  7. In theory you should now have a functional instance of Redmine BUT you are not yet done. Run the following to test
    • bundle exec rails server webrick -e production
    • OPEN a browser on the server and check http://localhost:3000
    • If you see what looks like Redmine CTRL+C and continue.
    • NOTE: You CAN run Redmine like this but it is not really stable enough for ‘real’ production use.
  8. IIS needs to be set up to run Ruby & Redmine. This detail will be added at a later date when I have time.


This seems useful / complimentary:

How to import your IIS logs into Piwik

Piwik is pretty awesome if you’re in the market for the functionality it provides. Unfortunately a lot of people who use IIS, SharePoint, .NET are not familiar with Python and may struggle with getting their IIS logs into Piwik. This should help if you are in that situation.

  1. Move your logs to a central location. PowerShell as a scheduled job is perfect for this. In this example let us assume it is D:LOGS
  2. Let us also assume that you are running Piwik on the local machine aka localhost on port 1000 and the ID of the site in Piwik is 1. These values are in the code below.
  3. Create a script called and paste the below into it. The TAB indents are pretty important.

import os, fnmatch, subprocess

def find_files(directory, pattern):
    for root, dirs, files in os.walk(directory):
        for basename in files:
            if fnmatch.fnmatch(basename, pattern):
                filename = os.path.join(root, basename)
                yield filename

for filename in find_files(‘C:LOGS’, ‘*.log’):
    #print (filename)
    os.system(“C:/inetpub/wwwroot/Piwik/misc/log-analytics/ –url=http://localhost:1000/ ” +str(filename) +” –idsite=1″)

Notes about the above.

  • You must NOT install Python 3.x. Install 2.x. This is a compatibility issue with Piwik.
  • I use MariaDB. If you are not familiar with it think of it as simply as it being a fully compatible fork of MySQL.
  • You can definitely optimize this script further by reading the Piwik docs. This is about as basic as it can be and still get the job done.
  • This is recursive so if you are moving the logs into server named subfolders, a good idea if you have a farm, it should work just fine.
  • I would strongly recommend that you move the files to a “processed” folder outside of the path above once you’re done. 
  • Make sure to set index.php as your default document in the IIS site you are running Piwik from.
If you need to do over then you need to get the log file data out of the DB. to do so remove the appropriate tables and delete the appropriate values similar to below. More details are in the Piwik FAQ here.
DROP TABLE piwik_archive_numeric_2011_01, piwik_archive_numeric_XX;
DELETE FROM piwik_log_visit WHERE idsite = X;
DELETE FROM piwik_log_link_visit_action WHERE idsite
= X;
DELETE FROM piwik_log_conversion WHERE idsite
= X;
DELETE FROM piwik_log_conversion_item WHERE idsite
= X;
More info and relevant downloads can be gotten here: 

An opinion on including multiple JS files in your project

There are many ways to solve an issue. Some work better than others though their pureness may be questionable. Getting many JS scripts and modules loaded is one such puzzle. I’m not a huge fan of require.js for a number of reasons that are already clearly, and eloquently, expressed by others. It is great at what it does, just not what I really want to use.What I do like is using a tool such as YUI compressor to facilitate delivering robust production code.

The following code is something I found on which I have since extended and included into my own projects.


# This script generates the following:
# Combined and minified javascript file for use in the app

"Combining JavaScript into temp files."

# temp.js is the uncompressed file with everything combined
> ./app/js/temp.js

"Compressing Combined JavaScript."
-jar yuicompressor-2.4.7.jar --type js -o ./app/js/temp.js --charset utf-8 ./app/js/combined.min.js

"Cleaning up temporary files."


And yes, I do work on OSX as well as Win8.