Ruby Webservice giving "POST not supported" error when using datanoise-actionwebservice gem

I have written SOAP web service in ruby using datanoise-actionwebservice gem but webservice sends following error in response:

Exception of type System.InvalidOperationException: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message:

Please advice how have you fixed this. I am facing the same Issue.