In Ruby you can reference variables inside strings and they are interpolated at runtime.
For example if you declare a variable foo equals \"Ted\
The 2 most obvious answers have already been given, but if they don't to it for some reason, there's the format operator:
>> x = 1
=> 1
>> File.read('temp') % ["#{x}", 'saddle']
=> "The number of horses is 1, where each horse has a saddle\n"
where instead of the #{} magic you have the older (but time-tested) %s magic ...