Skip to main content

Setting up mail server on Rackspace cloud server

Posted in

For a couple of projects lately, I've had to set up a Rackspace cloud server with enough email capacity to send emails and to receive them to be processed by a script. Here are the steps I've followed:

Making sure a daemon runs on server reboot

Posted in

Another piece of code that I always seem to have to look up when I need it... The command for getting mysqld (or another daemon) to start up when the server reboots is chkconfig, used as follows:

chkconfig mysqld on

If you just enter chckconfig, it will output a list of the daemons and their current status:

Running scripts with rails script/runner

Posted in

Lately I've been needing to write short Rails scripts to make changes and updates to items in the database and associated images. I repeatedly tried to create a freestanding script and then run it with "ruby script/runner [script-name]," to no avail.

In the end, my solution was just to put the script into the model file of one of my objects, then run it with "ruby script/runner [Object].[method]" -- this worked like a charm!

Restarting a rails app on shared hosting

Posted in

I don't work in Rails very much these days, so when I do go back to it I get frustrated that I've forgotten even the most basic principles and techniques.

If you've made tweaks to a Rails app and need to reload the cached version of the site, use the following commands to first find the process id (pid) of the dispatch.fcgi job, then kill that process:

  1. ps aux | grep ruby
  2. kill -USR2 [pid]

 

Turning Crisis Into Opportunity

Just when I felt as though I was catching up with everything and getting my life organized, the unexpected (of course) occurred: in the middle of working, my screen went black and displayed the error "2110 HDD0 (Hard Disk Drive) Error Reading". The drive was suddenly and irrevocably lost.

Lenovo didn't give me any trouble about replacing it, and within a week I had a new drive and recovery disks in hand. In the meantime, I did my work on Ari's computer without any trouble; since all of my work is on servers, I could pick up right where I left off.

Drupal modules used on this site

Posted in

 For my future reference, here are the Drupal modules that I've set up so far on this site:

  • Administration Menu
  • Advanced Help
  • CCK
    • Link
  • Contemplate
  • Devel
  • FCKEditor
  • Pathauto
  • Pixture Reloaded (theme)
  • Token
  • Views

In the space of about two hours, I've got the site, the design, and a few of the content types already up and running. This is why I'm learning to love Drupal!