Joseph,
I would suggest to (pre-)initialize the placeholders detected in the file 
through eval.
i.e. after having opened and read-in the file:
  ...
  placeholders = file_content.scan(/\#\{(.*)\}/)
  placeholders.each do placeholder 
      eval(placeholder.to_s + " = 'missing'")
  end
  ...

Hope I got your problem right? 
Also, I have not verified the regexp!

Clemens