After a little research I found the answer to my problem. I was using functionality, the find method to be specific, from the rsolr-ext gem which doesn't support grouping:
solr_connection.find(
{
:q => "*:*",
:group => true,
"group.field" => "group_id"
})
This will raise an error in the rsolr-ext gem because it can't parse the "group.field" part of the hash. Without it, Solr doesn't know where to group on.
The answer was quite simple. Just use the select method from the rsolr gem:
solr_connection.select(
{
:q => "*:*",
:group => true,
"group.field" => "group_id"
})
This works perfectly.