I'm trying to find and replacace the string "placeholder" in a text
file. Any idea how I could get the following code to work?

    file = File.open('/folder/template.txt', 'r+')
    file.gsub!(/placeholder/, "word")

Thanks,

Peter
-- 
Posted via http://www.ruby-forum.com/.