RecommendationEngine is a gem for Rails 3+ that simplifies collaborative filtering.