I applied the modified user.rb file and that has helped.
The system did still show the same error but I can now access the ldap tab without the error.
It looks like some of the agents have been imported but some are missing. I will investigate further tomorrow.
Thanks