REXML, rake aborted! Text is not a module

I am writing a rake task for my rails app to parse data from an XML and
keep getting the error:
rake aborted!
Text is not a module

here are the contents of my lib/tasks/xml_parse.rake

Switched from REXML to nokogiri. Any solution at this point is purely
academic...