When you set the contents of a node you actually set its text contents, meaning, Nokogiri automatically escapes it.
To add a node to your XML you need to use add_child
configs = File.read("configs.xml")
xml.search('component[name="RunManager"]').each do |node|
node.add_child configs
end