News Groups wrote:
> Hello All,
> 
>     I am new to Ruby Language. I just want to read a string using 'gets'
> function, but am getting the below error message.
> 
>    ERROR MESSAGE:  `gets': Bad file descriptor (Errno::EBADF)
> 
>     Can anybody please help me in solving this problem. Is it required to
> require any file to use 'gets' function.

You shouldn't have any problem. You don't need a require or anything.

1. Show us the code.
2. Are you passing anything on the command line?
3. What Ruby version, what platform?


Hal