Okay, so I am brand new to all coding in general. I am just starting my career and IT and have grown very interested in security. Because of this I am enrolled in security courses and, now going to try to learn this. Now I keep going through these early lessons and I think I'm just not thinking about this in the right way. I feel like I understand it, but only in the most literal sense. That is to say I don't really see how any of it applies to anything outside of making this box do things. Well anyway, there is my code and I think what I want it to do is self explanatory. The error is saying "undefined method 'integer' for "21":string". So I am assuming I haven't defined a variable somewhere but I have tried adding different things and I feel like I am just moving in the wrong direction. If someone could just let me know what I forgot to do, and maybe even have any advice about how to put this in context, it would be a tremendous help.
Thanks for reading. Code below
print "How old are you?" user_age = gets.chomp if user_age > 21 puts "Let's have a drink!" elsif user_age < 21 puts "Maybe in a couple years." end