La idea de hacer coincidir todos los valores en IN
cláusula tienes que hacer esto:
tag_ids = [1, 2, 3, 4]
Post.joins(:tags).where('tags.id IN (?)', tags_ids).group("posts.id")
.having("COUNT(posts.id) >= ?", tag_ids.length)
Espero que esto te ayude.