A Small Rails Site and Why You Should Build One

The other day I was showing Rails off to a friend of mine who wanted to know what all the fuss was about and I realized a shocking thing: I was horrible at starting a Rails site. Why? Because for the last year or so I've been working on large, established Rails codebases. Which is kinda cool as it shows how far Rails has come, but it sucks because one of the very cool things about Rails is how much you can do in a short amount of time.
So I resolved to create and deploy a small site as a way to exercise some atrophied muscles and have some good old fun with Ruby and Rails. My father, Leslie Scruggs, is a sculptor and I had written him a pure html site back in 1999. And he maintained it editing the raw html files, creating his own thumbnails, and uploading via ftp. Not the easiest of tasks for a man in his 60's. So I created lesliescruggs.com which has an admin section so he can upload pics and get them resized and thumbnailed with 10% of the effort.
Of course I used attachment_fu for image handling (resizing, saving, deleting, etc.) but I was impressed how much better it's gotten in the last year. You can now use ImageScience or MiniMagick as the back end image processor and you can save files to Amazon's S3. And, maybe it's just me, but it seems like it's easier to use than ever. Restful_authentication was also impressive in its gains. I've had mixed results with Rails plugins for authentication in the past, but everything went very smoothly. One of the things I really liked was the ability to omit the action mailer part of the plugin. Sometimes you just don't need to be able to email lost username/passwords and it's nice to be able to leave that code out. Another nice surprise was after upgrading to the latest IntelliJ I found that creating a project with RSpec was an option. Worked well, too.
And page caching, something I've been meaning to try, was pretty easy to implement and perfect for a site like this. All in all I highly recommend banging together a quick (this one took about 2 weeks of spare time) Rails website as you'll have fun and learn a bunch of things your day job won't teach you. Especially about deployment -- but that's another post.

Comments

Popular posts from this blog

What's a Good Flog Score?

SICP Wasn’t Written for You

Point Inside a Polygon in Ruby