-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Redmine Cookbook
By :
This recipe teaches you how to install Redmine on Windows servers. It covers the Windows 2012 R2 Standard version and Microsoft SQL Server versions 2008 or later. However, this recipe can most certainly be applied to other Windows server versions. Also, PostgreSQL and MySQL can be used instead of Microsoft SQL Server (MSSQL).
Make sure that the Windows server is properly installed with all the default libraries and required drivers. This recipe is based on Microsoft SQL server, and it assumes that you already have it installed. If you need to install it, make sure that you add the proper roles to the server first and include .NET 3.5 (required for SQL server 2014). Any type of MSSQL can be used (Express, Standard, Enterprise, and so on). Prepare a database named Redmine, and create a user for it. Prior to your Redmine installation, make sure that you have enabled SQL Server's TCP IP connectivity options by following the instructions that are provided here:
This will ensure that you have prepared your SQL server successfully.

Prior to your Redmine installation, make sure you have created the SQL server's user and database for Redmine, and that you can connect via IP with your Redmine user credentials successfully, as depicted in the previous screenshot.
C:\ruby\ruby2 as a path:
After a successful installation, in your Start menu, a new shortcut named Start Command Prompt with Ruby should be visible. Once clicked, you can type ruby –v and confirm that Ruby is successfully installed.
Next, we need to install the DevKit 4.7.2 minigw 64-bit version by performing the following steps:
Make sure you are downloading the proper DevKit, it needs to match your Ruby version and system architecture: 64-bit or 32-bit.
C:\ruby\devkit.C:\ruby\devkit by typing the following command:cd C:\ruby\devkit
ruby dk.rb init
ruby dk.rb review
C:\ruby\devkit\config.yml with Notepad and enter a line such as C:/ruby/ruby2 so that when running ruby dk.review, you will get a screen like this:
ruby dk.rb install
When this is done, you will be informed that DevKit is installed.
devkitvars.bat
gem, as follows:gem update
bundler by typing the following:gem install bundler
C:\ruby\redmineThis recipe uses Redmine 3.1.0, which is tested with this recipe, but probably newer versions will also work.
C:\ruby\redmine\config\database.yml.example to database.yml.C:\ruby\redmine\config\database.yml. You will find the MSSQL sample configuration at the bottom of the file, but it's enough just to edit the first production configuration in database.yml so that it looks like this:production: adapter: sqlserver database: redmine_db host: 127.0.0.1 username: redmine_ms_sql_user password: "redmine_db_password"
Replace the values in this code with configuration values that fit your server's IP address and database credentials.
bundle install --without development test rmagick mysql postgresql
bundle exec rake generate_secret_token
set RAILS_ENV=production bundle exec rake db:migrate
set REDMINE_LANG=rs bundle exec rake redmine:load_default_data
bundle exec rails server webrick -e production
If everything is okay, you should get a screen that looks like this:

After this, Redmine should be accessible via http://localhost:3000.
For a Windows installation to work, we need a proper Ruby version and a Microsoft SQL server. It is not obligatory to use the Microsoft SQL Server, but this recipe uses it just from the perspective of trying to stick with Microsoft technologies. First, we set up a blank database and user for Redmine on the MSSQL server, and we make sure that it is working and able to connect via TCP/IP correctly. After this, we download and install a precompiled binary Ruby and DevKit that fits our chosen Ruby version. Then, we update Ruby gems and install bundler. After downloading and configuring database parameters for Redmine, we proceed by bundling Redmine, generating a session store token, and populating the database. After this, our installation is done, and we can test it with WEBrick.
Now that you have Redmine successfully installed, running it requires a different recipe. To run Redmine on Windows, there are a few options that you can use, such as Apache + Fcgi, Nginx, or Puma.
The next recipe Using Puma and IIS on Windows is a very nice and flexible way to run Redmine.
Change the font size
Change margin width
Change background colour