Related select form plugin problem

I’m trying to use the dvisionfactory related select form plugin to
display categories with dependent subcategories in select boxes in a
form. I think I’m very close, but I can’t quite get it to work. This
is my view:

<%= collection_select(:category, :id, @category, :id, :title) %>

<%= related_collection_select(:subcategory, :id, [:category, :id],
@subcategory, :id, :title, :parent_id) %>

Which renders this in the HTML page source:

Accommodation and Food Services

Administrative and Support and Waste Management and Remediation Services Agriculture, Forestry, Fishing and Hunting </

select>

This page source looks OK to me, the categories and subcategories are
right. The problem is that there is nothing in the subcategory select
box on the screen, whether I select a value in the category box or
not. I don’t have much javascript experience so this is driving me
crazy.

Any help appreciated.