Writing
Notes on building software — the decisions that age well, the ones that don't, and what I learn in between.
-
Nested Attributes in a Form for Has_One Model Association in Rails
Just for reference...
-
Destroy Children In Rails 2.3
In the parent class place the following code This used to be accomplished with Check out the Rails docs for more information...
-
Make Rails Lib Module Methods Available to Views
If you create a module in the lib/ directory of your Rails application you won't have access to those methods in your views. If you don't want to put those methods in a helper file, you need to add...
-
Use a Cron Job to Automate Sphinx Index Refresh from Rails Rake Task
If using Sphinx, you need to refresh indexes when you add new content to your database. This is fairly easy to do by hand But if you want to automate this and use a cron, remember to set the PATH,...
-
How to Get Your User's SHELL and PATH Information
How to find your user SHELL and PATH on Linux Which will print the paths to the screen
-
Why Doesn't Google Offer Dedicated Virtual Hosting?
AppEngine is nice, but it's a little limiting. No cron jobs, filesystem use nor customization with third party libraries, software, databases, languages, etc. You can't deploy PHP, Ruby and or your...
-
Installing Feedzirra RSS Parser on Ubuntu 8
I recently watched a RailsCasts episode (http://railscasts.com/episodes/168-feed-parsing) on parsing and persisting RSS feeds using Feedzirra. It took a little setting up on Ubuntu because it...
-
Email Obfuscation and Extraction from Text with Rails
There is a helper method for handling the obfuscation of email addresses in Rails. If you want to then extract an email address(or all email addresses) from a block of text here is the code. I...
-
Fixing MySQL for Rails 2.2 Development on Mac OS X
Oh what trouble Rails 2.2 and MySQL (on Mac OS X) can be. Rails, as of version \= 2.2, no longer comes bundled with the MySQL adapter. This means you'll need to install it yourself, but it appears...
-
Installing Sphinx Search Engine on Mac OS X... or ld: library not found for -lmysqlclient
If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message...
-
Recursively Zip a Directory and Files on Linux
It's Short and sweet! Just remember that the finished zip filename is the first argument and the directory you wish to recursively zip comes after. zip -r nameofyourdirectory.zip...
-
Add User Directories to Apache2 Web Server
You can either link up the modules yourself like this: Or you can use the Apache utility Just remember to restart the server with Also, keep in mind that by default, the home directory for your...
-
Protect a Directory with Apache, .htaccess and httpasswd
Apache comes with a command line utility called "htpasswd". This utility will generate a username and password that you can use to authenticate against using a .htaccess file. Just run the utility...
-
Postfix, ActionMailer and OpenSSL Fix on Ubuntu
If you run into problems using ActionMailer \ 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following: Change to OpenSSL support with Postfix does not work out...
-
Install Rmagick on Ubuntu with MagickWand
The last command will spit out a bunch of "No definition" comments. There are no rdocs available and this is why.