Entries Tagged as 'Programming'

Choosing a Language for Custom Nagios Plugins

Choosing a language in which to develop your custom Nagios plugins is pretty easy. You have two roads you can go down: compiled or scripting.
If you decide to build plugins using a compiled language, just about any will do. Generally speaking, C is the usual choice for something like this, but it is […]

Categories: Programming

Apache, SSL, Rails and a Broken Redirect

If you are using Apache and SSL as a proxy front-end for your Ruby on Rails application, you might have a problem with redirects if the backend server (Mongrel, for example) does not use SSL.
In a nutshell, you’ll discover that redirects are sent to a non-SSL URL (noticeably lacking an s in http://). This […]

Categories: Programming

ActiveRecord and SELECT DISTINCT

I’m writing this post for two reasons:

For some reason, I couldn’t find a lot of information on ActiveRecord and SELECT DISTINCT().
I’m hoping some Ruby / ActiveRecord guru will stumble across this and provide a better solution.

Recently, I was working on a project written in Ruby with ActiveRecord that required me to draw a list of […]

Categories: Programming

Installing RubyGems with MacPorts

Quick note.
I recently needed to install a few RubyGems on my Mac OS X 10.4 (Tiger) development system. I use MacPorts to keep my system consistent, but MacPorts was causing the problem. Here’s a look at the output I was getting while trying to install Active Support.
$ sudo port install rb-activesupport
—> Staging […]

Categories: Programming

Logging Active Record Queries to a File

I was recently helping a developer with some SQL optimizations in Ruby. The developer was using Active Record, and (until now) my Active Record experience has been pretty minimal.
One thing that was really driving me bonkers was how to get Active Record to print out the queries it was building. I was certain […]

Categories: Programming

Close
E-mail It