Archive for the ‘ruby’ Category

Sanely Updating Your Gems

If you followed my advice in the previous post, your Gemfile would look something like this:

source :rubygems
 
gem 'rails', '3.0.3'
gem 'devise', '1.1.5'
gem 'redgreen', '1.2.2'
gem 'capybara', '0.4.0'

There’s nothing wrong with this except that if you wanted to keep your gems up to date frequently it would be tedious to manually change all of these versions. Fortunately, we don’t always have to be this exact with the version numbers.

The No-Nonsense Guide to Managing Gem Versions

If the Ruby code you write never leaves your computer, then this article is not for you. But if you find yourself sharing Ruby code with others, or deploying your Ruby code to a web server, then you have a problem. And that problem is gem versions. Sooner or later, the version of a gem on your computer will not match the version of that gem on your production web server, and your cute little disruptive social media web app will fail in a steaming pile of 500 errors.

Introducing Tabulous: Tabs in Rails

If you’re like me, most of the Rails applications you’ve written use tabbed navigation. And if you’re like me, you find that writing the code to handle tabs becomes increasingly more boring with each new application. So I wrote tabulous. Tabulous aims to solve this problem once and for all with a quick and easy way to set up and manage your tabs.

Rack::Plastic Helps You Write Rack Middleware

Back in November I participated in the CodeRack Rack middleware contest. Besides submitting entries that were stupid and downright dangerous I actually managed to create some middleware of value.

Using Capybara in Rails 3

Capybara makes it easier to write integration tests. Its syntax is very similar to Webrat’s. The main difference between Capybara and Webrat is that Capybara has more architectural flexibility. It works with a variety of JavaScript-enabled browser simulators and–because it’s based on Rack–it works with any Rack-compatible web application or framework. Another advantage is that Capybara is compatible with Rails 3, but Webrat isn’t. Because Capybara is basically a more flexible Webrat, Capybara and Webrat are likely to merge.

Rails 3 Online Conference Word Cloud

I used Wordle to create a word cloud from the chat transcript of the Exploring Rails 3 online conference.

Installing Rails 3 Beta with RVM and Ruby 1.8.7

Jeremy McAnally posted some great instructions on installing Rails 3 beta. When I tried to install Rails 3 it complained that my Ruby version needed to be at least 1.8.7. Fair enough, I only had 1.8.6, and it was about time I upgraded.

Getting Mugged by Nokogiri

Once you’ve gotten started with Nokogiri, you’ll expect everything to be as easy as the beginning, and then–BAM!–you’ll get sucker-punched.

Getting Started with Nokogiri

Nokogiri is a Ruby document parser that was released in October 2008. It’s great for reading, searching, editing, and otherwise mucking around with HTML (and XML).

New Release of Alphabet Clock

I’ve made some improvements to Alphabet Clock, most notably the inclusion of dates and developer libraries.  Read the full story on Alphabet Clock’s blog.