Technology Insights

Start a Ruby On Rails Project In Development Mode With Apache And Mongrel

A friend of mine was over tonight and we were troubleshooting a issue with SVN authentication via the Redmine project management software. Redmine is built with Ruby and on this server is running via Apache and Mongrel. I needed to set the project to run in development mode but wasn’t very familiar with the Mongrel setup. After some research I found it was easy to change the environment from production to development using the Mongrel Cluster .yml file for that project. When using Mongrel each site appears to get its own .yml file so you can modify whatever settings you want to on a per site basis. Below I describe what needs to be changed, default locations, and any other actions that need to be taken to restart the Ruby on Rails project in development mode.

Technology Insights

Apache Rewrite: Do Not Redirect For A Certain Port Using RewriteCond

This seems to be the week of the Rewrite Engine for me as this is the second semi unique modification I have needed to make to one of our servers rewrite rule sets. This time we have a site where all traffic destined for HTTP is redirected to HTTPS via the LiteSpeed Rewrite Engine. Currently there are no exceptions to this rule on the server except if you are already visiting HTTPS you obviously do not get redirected to HTTPS. So a description of the project along with the necessary syntax to exclude certain ports from your rewrite rule set are below.

Technology Errors

Error Starting Ruby Script/Server On A Macbook Pro Running OSX With PostgreSQL, Ruby, & Mongrel

A friend contacted me the other day because he was having an issue starting his development environment which consists of Ruby, PostgreSQL, and Mongrel. Ruby communicates with PostgreSQL using the postgres-pr gem version 0.6.1. Starting things using “ruby script/server” from within his Ruby project had been working for months without issue and there had been no confguration changes to Ruby, Postgres, or Mongrel so it appeared to not be configuration related. After getting a brief explanation of the issue I logged into his laptop and attempted to start the server. Below is the error received when attempting to start the server using “ruby script/server” via a terminal window on the Macbook Pro.