Archive for the ‘Programming’ Category

Quick Tip: Override Rails Generated URLs

I explore a quick and simple way to change the default URLs generated for a Ruby on Rails resource. With this tip, there’s no need to modify the usage of URL helpers or anything else in your code. After making the change URLs for that resource will be generated as you’ve specified them.

Read the rest of this entry »

Enable Secure Admin for WordPress

Do you access your Wordpress installation from untrusted locations like coffee shops? If so, you may be sending your password in the clear and any malicious individual can see it!

This post describes the steps I took to secure the Wordpress administration area for Millarian. It will lead you step-by-step through creating a self-signed certificate, modifying Nginx and modifying Wordpress to enable this functionality, all with supporting documentation.

Read the rest of this entry »

Igniting Phoenix Developers

Developer Ignite Phoenix is an event hosted by Intel following the same format as O’Reilly’s Ignite events. Each speaker has 5 minutes to talk about the contents of their 20 slides. What’s different about this event? It’s all about the technology, baby!

Come see my partner at Flatterline, Chris Chandler, speak about cryptography.

Read the rest of this entry »

Monitoring Thin using God, with Google Apps Notifications

We’ve been using God to monitor our Thin processes on Freebootr and set it up to notify us through our Google Apps account. Thought our God config file might be useful to anyone trying to use God with Thin and Google Apps.
Thin configuration

# == God config file
# http://god.rubyforge.org/
# Authors: Gump and michael@glauche.de
#
# Config file for [...]

Read the rest of this entry »

Installing aspell and raspell for Ultrasphinx

We’ve been playing around with the Sphinx full-text search engine and Ultrasphinx, the Ruby on Rails configurator and client to the Sphinx full text search engine. Sadly, it was giving us a warning about spell checking:
ultrasphinx: spelling support not available (raspell configuration raised “uninitialized constant Ultrasphinx::Spell::Aspell”)
This is pretty easy to get rid of, though. You [...]

Read the rest of this entry »

Error after upgrading SliceHost

If you happen to see this error after upgrading your SliceHost account, be calm.

ActionView::TemplateError (Define INLINEDIR or HOME in your environment and try again)

The simple solution is to add an environment declaration to your environment/production.rb file:

ENV['INLINEDIR'] = ‘/path/to/.ruby_inline’

Once that was set, we were in business again… whew!
References
Here’s a relevant reference that took a while to [...]

Read the rest of this entry »

Quick Tip: Setting an SPF record

I recently noticed a lot of rejected emails coming from a production app that had just switched to send mail through Google Apps. For some reason Google felt we might be spammers, so it began rejecting our emails out-of-hand. We would continuously get the following error message:

Technical details of permanent failure:
Message rejected. See http://mail.google.com/support/bin/answer.py?answer=69585 [...]

Read the rest of this entry »

Quick Tip: Rails 2.1 Time Zones

My last quick tip involved setting your time zone in Ubuntu Hardy, so now, how do you set your time zone in a Ruby on Rails application? Rails 2.1 makes it much easier to manage time zone settings than it was previously.
Add the following to your environment configuration file:
config/environment.rb

config.time_zone = ‘Arizona’

Replace Arizona with your own [...]

Read the rest of this entry »

Quick Tip: Setting time zone on Ubuntu Hardy

I’ve been pretty enamored with SliceHost recently. They make it very easy to setup a slice, configure it and get your product deployed quickly (I’m down to 30 min). I hadn’t noticed until just recently that I’ve never set a time zone on any slice I’ve configured. So, here’s how you do it, simple and [...]

Read the rest of this entry »

Nginx 405 Not Allowed Error

405 Not Allowed
So, I got this error today and it took me a few minutes to track down why. Seems like the kind of thing that might be interesting to people. I’m using nginx on a project and this error was being thrown by nginx, not by Rails. What could be the cause?
Nginx configuration [...]

Read the rest of this entry »