Variables added to string problem?


I was doing the 'th' challenge and ended up completing it but instead of printing my variables information it just printed #{user_input} to the console? Any similar problems or a solution? Thx in advance.


Can you post your code please?


I was in the first few lessons, my code was;

name = "Cade"
puts 'Oh so your name is #{name}!'

Instead of printing: Oh so your name is Cade!
It Printed: Oh so your name is #{name}!
This problem has been happening every lesson since with trying to print variables.


I think the problem is that you're using simple quotes instead of double quotes.


Yes! I checked it and it worked! Thanks, but do you know why I have to use " instead of ' ?
I don't understand why.


Well in Ruby it seems that double quotes allow special treatments inside the strings (like #{}) while single quotes prevent them.


Thanks for helping me out! ;D