October Hikes

Posted by Scott on Oct 30th, 2007

A few photos from some hikes I did this month.

Mount Percival Mount Morgan

Mount Percival and Mount Morgan, right off of Squam Lake. I climbed both over the course of 4.5 hours.

Blue Job Mountain

Blue Job Mountain, a short hike I do frequently in the late fall.

Amazon Startup Challenge

Posted by Scott on Oct 30th, 2007

I’d like to give a shout-out to Nick and wish him and Ty the best of luck with their application to the Amazon Web Services Startup Challenge. I’m rootin’ for ya!

The Top 10 Ways to Ruin Your Rails Project

Posted by Scott on Oct 27th, 2007

Clifford Heath wrote a sarcastic yet poignant list of all-too-common screw-ups people can make when creating and deploying a Ruby on Rails project.

Sometimes you laugh because it’s funny. And sometimes you laugh because it’s true.

Ubuntu Release Day – 7.10 “Gusty Gibbon”

Posted by Scott on Oct 18th, 2007

Congratulations and a huge THANK YOU to the folks who participated in the creation of the latest release of Ubuntu GNU/Linux (and that’s a lot of people)! I’ve used a number of GNU/Linux distributions, and Ubuntu meets my needs perfectly for desktop usage and as a software development platform.

Where I work, I tend to go a bit overboard and run a release party, which last year featured an Ubuntu cake and balloons. This year we kept things simple with orange cupcakes and donuts (which were scuplted into the shape of the Ubuntu logo by my colleague and friend Jim). Everyone in the Engineering group knows when a new release of Ubuntu comes out, and it’s a great (if somewhat geeky) way of spreading the message of free software and the spirit of Ubuntu.

I’ve been extremely busy lately and probably won’t have a chance to install the new release for another week or so. But it won’t be long until all of my computers are running the Gutsy Gibbon.

Migrating Your Rails App to v1.2.5

Posted by Scott on Oct 16th, 2007

Within a couple of days of the release of Ruby on Rails v1.2.4, an important security fix was announced and rolled into yet another release (v1.2.5). This time, however, I will not be giving you a diff of changes between the versions. It turns out this is not necessary!

I just recently learned of a rake task you can use to upgrade your Rails application which applies version upgrade diffs for you. Now, to upgrade your Rails app, simply update your gem, update the RAILS_GEM_VERSION constant in your config/environment.rb file to the latest version number and run

rake rails:update

If this little tidbit wasn’t included in the official announcement of v1.2.5, I would never have known. Lesson learned: it’s worth spending some time looking at the output of rake -T to see what useful recipes you might have but be unaware of.

Don’t forget, tonight is the October NHRuby.org meeting. I’ll be giving a talk on deploying Rails applications using Vlad the Deployer.

Migrating Your Rails App From v1.2.3 to v1.2.4

Posted by Scott on Oct 11th, 2007

The Ruby on Rails crew has stamped the final release of the v1.2 series of Rails. Go get it with your standard gem update command. They did a good job this time keeping changes within the gem itself. If you want your existing v1.2.3 app to use the same code base as a fresh v1.2.4 app, you only need to make the following changes:

config/boot.rb:

Remove the following code from the top of the file (sorry, the indenting is off in this post due to WordPress issues with the <code> tags):

unless defined?(RAILS_ROOT)
root_path = File.join(File.dirname(__FILE__), '..')

unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
require 'pathname'
root_path = Pathname.new(root_path).cleanpath(true).to_s
end

RAILS_ROOT = root_path
end

And in its place add the following code snippet:

RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)

Finally, just update the RAILS_GEM_VERSION constant in your config/environment.rb to ‘1.2.4’ – that’s it.

Tips for Deploying Rails Apps with Vlad the Deployer

Posted by Scott on Sep 29th, 2007

I deployed a Ruby on Rails application using Vlad the Deployer for the first time today. Vlad is a much, much simpler alternative to Capistrano, which I’ve also used.

However, the process wasn’t as smooth as it could have been. I ran into the following issues that required some digging:

1. My subversion repository is accessed via an https web server, which happens to use a self-signed SSL certificate. The svn program prompts you to verify and save this certificate the first time you perform a checkout. Vlad hung on this prompt until I logged into my deployment server as the user and manually completed a checkout from the repository.

2. My subversion repository is also password-protected using HTTP authentication. Vlad apparently doesn’t know how to deal with this, as I couldn’t find any documented variables to set an svn username or password. However, I could override the subversion command, and add switches for the username and password in my deploy.rb file:

set :svn_cmd, "svn --username=\"USERNAME\" --password=\"PASSWORD\""

3. The vlad:start task runs apachectl to give apache a kick after starting up mongrel. That binary was not in my user’s path, so I had to edit the user’s .bashrc file to add /usr/sbin to the $PATH environment variable. Second, the apachectl command needs to be run with root privileges, and Vlad seems to have no knowledge of sudo. To fix this, I was going to override the vlad:start task, and started poking around the gem sources to see how the original task was defined. That’s when I noticed that it sets the variable :web_command internally, so I was instead able to override that with another addition to my deploy.rb file:

set :web_command, "sudo apachectl"

These weren’t a huge deal, but that’s only because I’ve dealt with Capistrano and have an idea of what variables should exist to configure these kinds of options. I’m liking Vlad a lot.

In fact, I’m pretty sure for October I’ll be doing a presentation for NHRuby.org on Vlad the Deployer.

Backing Up Linux Systems

Posted by Scott on Sep 29th, 2007

I’ve used a decent number of backup systems on the Linux platform. From my UNH SysAdmin days, AMANDA was the system of choice, and we backed up to DLTs. Since then I’ve had the luxury of not needing solutions that are quite so enterprise-y. Mostly I’ve gotten to know rsync pretty well and integrated it into some home-grown scripts.

Recently I came across two open source backup packages which are based on rsync but give you more power, rsnapshot and BackupPC. The latter is fairly complex and geared toward enterprise environments, and even has a web-based interface for viewing backup reports. But for backing up an individual workstation with an external backup drive, rsnapshot can’t be beat. Its configuration file is easy to understand and get going with in minutes, and it’s well tailored for straightforward backup applications, with a bit of flexiblity where it makes the most sense (rsnapshot works well across networks for remotely backing up systems as well). Both of them make wise use of hardlinks to dramatically decrease the size of consecutive backup sets.

Check these apps out if you haven’t heard of them and want to look to simplify your backup system.

« Prev - Next »

Blog Badges



[FSF Associate Member]

Archives