Hello everyone! New to Ruby


#1

New(ish) to coding. Learned some Ruby in the past through the Google Coursera IT Specialization course, but decided to do some more deep diving before I attempt to build my first Ruby Script for deploying on my companies networked computers (For setting up new users, etc)

Want to bring the best code obviously, so that my boss will be impressed. But also so I don’t have errors.

Now let’s start with my question haha. I’m working through the initial Ruby ‘Repeat for More Input’ section, and I’m almost certain my code is correct… but maybe one of ya’ll can tell me why it’s printing both sections in one line!

I can’t seem to get it to stop! As soon as I do more than 2 (Add in the code to collect the City) it prints them immediately back to back, even though I have separate .chomp. Soooooo :smiley:

https://www.codecademy.com/courses/learn-ruby/lessons/putting-the-form-in-formatter/exercises/repeat-for-more-input?action=resume_content_item:


#2

This is a late reply, so the first question back to you would be, did you make it past this exercise? If so, please let us know how you addressed the issue (page refresh, different browser, &c.).

What we see above does look to be a terminal issue. If for some reason you can not get past it, then another option is to preset your values and skip the gets altogether.

first_name = "wee".capitalize
last_name = "gillis".capitalize
city = "fort william".capitalize
state = "hd".upcase

Now just put together a nice template string and Bob’s your uncle!