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 Errors

PostgreSQL Table Issue: Mduplicate key value violates unique constraint

It is possible for data within a PostgreSQL database table to get out of sync. When this happens it is possible for an attempt to be made to write data to a row in a table that already exists. This is being kept track of internally within Postgres by an ID of some sort and you can reset what the next ID that will be written to a row will be. Typically this will resolve your issue.

I received the below error in a Ruby on Rails application that was attempting to write data to PostgreSQL and at some point the data got out of wack.