# FreeRide - How to Input Data

**URL:** <https://www.ruby-forum.com/t/freeride-how-to-input-data/55631>\
**Category:** Ruby\
**Created:** [March 22, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/freeride-how-to-input-data/55631 "2006-03-22T16:55:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Kiselewsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@Bill\_Kiselewsky](https://www.ruby-forum.com/u/Bill_Kiselewsky)\
**Post date:** [March 22, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/freeride-how-to-input-data/55631/1 "2006-03-22T16:55:24Z")

</div>

Hi,

New to Ruby and using the FreeRIDE IDE. I tried to run the following  
simple program but can’t figure out how to enter data when the run stops  
at the second line of code. what’s the secret?

puts ‘Hello there, and what’s your name?’  
name = gets.chomp  
puts 'Your name is ’ + name + ‘? What a lovely name!’  
puts 'Pleased to meet you, ’ + name + ‘. :)’

Thanks,  
Bill Kiselewsky

---

<div class="post-metadata">

**Author:** ![Bill\_Kiselewsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@Bill\_Kiselewsky](https://www.ruby-forum.com/u/Bill_Kiselewsky)\
**Post date:** [March 22, 2006, 9:08pm UTC](https://www.ruby-forum.com/t/freeride-how-to-input-data/55631/2 "2006-03-22T21:08:07Z")

</div>

Forgot to mention the platform being Windows XP.

Well, after hours of messing around I found that outside of FreeRIDE I  
could execute interactively by double clicking the \*.rb file in  
explorer. This opened a c:\ruby\bin\ruby.ex window which allowed me to  
execute an interactive Ruby program.

Program:  
puts “Please enter your first name …”  
fname = gets.chomp  
puts “Please enter your middle name …”  
mname = gets.chomp  
puts “Please enter your last name …”  
lname = gets.chomp  
chars = fname.length + mname.length + lname.length  
puts fname + ’ ’ + mname + ’ ’ + lname + ’ there are ’ + chars.to\_s + ’  
characters in your full name!’  
gets

Interactive:  
Please enter your first name …  
William  
Please enter your middle name …  
Anthony  
Please enter your last name …  
Kiselewsky  
William Anthony Kiselewsky there are 24 characters in your full name!

Take care,  
Bill K.
