While developing my blog in Rails, I resolved to include a mechanism for assigning arbitrary, SEO-friendly URLs to my content, similar to what the Path module in Drupal does. Such a feature is common in popular blogging engines like WordPress and Blogger, so it didn’t seem such a far-fetched feature.
Implementing the functionality turned out to be much more difficult that I had first imagined. The problems I encountered, which led me deep into the bowels of Rails to understand and resolve, have left me with a vastly improved understanding of how a Rails application works. Below, I detail some of those problems and how I overcame them. Continue reading →
While working on the SlugEngine built into this blog site, I came across a note-worthy errata in the book Rails 3 in Action.
Section 18.3.1 states that the following two lines in
config/routes.rb are functionally equivalent:
# method one
mount Foo::Bar, :at => 'foo/bar'
# method two
match 'foo/bar', :to => Foo::Bar
These two routes are similar. In fact,
mount in turn calls
match to complete the route setup. However, the difference (as of Rails 3.1.1) lies in the options that
mount passes along to
match. Continue reading →
Upgrading to Rails 3.1 on Heroku — Part III: Rails
Up to this point in this series I have been focused on some of the prerequisites to upgrading Rails to 3.1. In this post, all of those requirements have been satisfied, and I can finally get to the meat of the task: upgrading the Rails gem! Continue reading →
In the last post, I started upgrading to Rails 3.1 on Heroku by first satisfying some of the prerequisites, such as ensuring that my application would run on Ruby 1.9.2.
In this post, I’m going to continue that process by actually migrating my Heroku application from a Bamboo stack to the new Cedar stack.
Since this is a real-world, live application, it’s important that everything be tested in a staging environment before I start mucking about with the live application. Since Heroku apps are (almost) free and take (almost) no time to setup, I’ll be relying heavily on that feature during this process.
Continue reading →
I am developing an application on Heroku’s Bamboo stack (bamboo-ree-1.8.7) that’s currently on Rails 3.0. I’d like to upgrade to Rails 3.1 to get the new asset pipeline working for me, but that, unfortunately, isn’t quite as easy as just updating my Gemfile. In this first part of the series I’ve documented the prerequisite steps by upgrading to Ruby 1.9.2 on my local machine. Continue reading →
A few months ago, after purchasing a Nikon D7000 DSLR camera, I decided I should
really get serious about maintaining a blog on which to not only showcase my photography, but also to showcase myself, as a photographer, a developer and as a person. I want a “portfolio of me”; something a potential client or employer could look at that would represent who I am and what I can do.
I have started and abandoned blogs in the past, and have generally lost interest shortly after getting the blog up and running, making it look and feel like something I like, and making a few posts. But this time had to be different. Continue reading →