error_messages_for doesn't generate output though the instance seems to contain error messages

Hello folks,

I am having problems with something rather simple. I have in my rhtml
file the following code fragment -

      <%= error_messages_for 'loan' %>
        <% for e in @loan.errors
        logger.info("---> error = " + e.to_s)
      end%>

In development.log file I see the following show up

---> error = loan_type_idsYou need to select at least one loan type
---> error = loan_amountcan't be blank

However I don't see any html output from the call to
error_messages_for in the page returned containing the error. Not sure
why error_messages_for is not generating the output.

Thanks for any pointers.

Sanjay.