-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Redmine Cookbook
By :
Puma is advertised as a small and fast server. It is derived from Mongrel, which is an open source web server written in Ruby by Zed Shaw. It can serve Redmine on its own, or behind Nginx, Apache, or IIS. Puma can be run and installed in a user's home directory or system-wide.
First, install Redmine as explained in the previous recipe.
Then, we need the OpenSSL Developer Package (this contains header files and binaries), which can be downloaded from http://packages.openknapsack.org/openssl/openssl-1.0.0k-x64-windows.tar.lzma. Considering that we followed the previous recipe precisely, if you need a different SSL version, you can obtain it from https://www.openssl.org. Now, perform the following steps:
C:\ruby.openssl, in C:\ruby and copy the downloaded OpenSSL lzma archive here.C:\ruby\openssl by typing the following: cd C:\ruby\openssl. Extract the content of the archive by typing:bsdtar --lzma -xf openssl-1.0.0k-x64-windows.tar.lzma
If minigw bin from devkit is not added to path, you must specify full folder in order to execute bsdtar, and it would look somewhat like this:
c:\ruby\devkit\mingw\bin\bsdtar.exe --lzma -xf c:\ruby\openssl\openssl-1.0.0k-x64-windows.tar.lzma
C:\ruby\openssl.Once you have installed Redmine and its prerequisites, as explained in this recipe, proceed by installing the Puma server by typing the following:
gem install puma -- --with-opt-dir=c:\ruby\openssl
This recipe assumes that your Redmine is installed, as explained in the, Installation on Windows servers recipe.
Run the following command from Redmine's directory in the command prompt:
puma -e production -p 3000
You should get a screen that looks like the following:

Navigating to http://127.0.0.1:3000 on your browser should open Redmine screen.
To have your Puma server started automatically with Windows, perform the following steps:
pumastart.bat, in C:\ruby with the following contents:cd C:\redmine start /min puma -e production -p 3000 -t 8:32
pumastart.bat.You should add an IIS role to your server and install the following two add-ons to IIS. You can install them directly from the Microsoft website.
You can get the URL Rewrite from http://www.iis.net/download/URLRewrite and the reverse proxy from http://www.iis.net/download/ApplicationRequestRouting.
127.0.0.1:3000.If your Puma server runs after clicking OK, you should be able to type http://localhost or whatever your server name is and you will get the Redmine welcome screen.
At first, we needed some prerequisites to install Puma because the gem to install Puma compiles it on your machine, and it requires proper OpenSSL library headers and binaries to compile. This is the reason why OpenSSL and dev tools are required. Then, the Puma installation is tested just by typing puma -e production -p 3000. To ensure that Puma starts after the Windows server restarts, Task Scheduler is used, and it schedules Puma to start on boot through a BAT file. In a bat file, command –t 8,32 tells Puma to start with a minimum of 8, and a maximum of 32 threads. You can adjust these values to fit your configuration. After this, we installed two Microsoft original modules to the IIS server and added a reverse proxy rule to forward all requests to 127.0.0.1:3000 where the Puma server is listening. We used the default IIS site, but this rule works with any or multiple IIS sites.
This recipe can be easily adopted to use Puma behind Nginx or Apache on both Windows and Linux systems. Also Thin or Unicorn can be used instead of Puma.
Check out the Puma website for updates, additional configurations and fine-tuning:
Change the font size
Change margin width
Change background colour