# SciTE problem with gets method

**URL:** <https://www.ruby-forum.com/t/scite-problem-with-gets-method/104599>\
**Category:** Ruby\
**Created:** [May 20, 2007, 8:51am UTC](https://www.ruby-forum.com/t/scite-problem-with-gets-method/104599 "2007-05-20T08:51:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 20, 2007, 8:51am UTC](https://www.ruby-forum.com/t/scite-problem-with-gets-method/104599/1 "2007-05-20T08:51:01Z")

</div>

I just today started out with Ruby and when I tried to use the gets  
method, I get a black box with a blinking cursor in it. Nothing  
happens when I press any buttons.

Why?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 20, 2007, 12:43pm UTC](https://www.ruby-forum.com/t/scite-problem-with-gets-method/104599/2 "2007-05-20T12:43:31Z")

</div>

removed\_email\_address@domain.invalid wrote:

> I just today started out with Ruby and when I tried to use the gets  
> method, I get a black box with a blinking cursor in it. Nothing  
> happens when I press any buttons.

print("Enter some text: ")  
$stdout.flush  
input = gets  
puts(“You entered \<#{input}\>”)

Running in SciTE it open a cmd prompt (where the ruby interpreter is  
called).

Output goes to SciTE-output pane - so you can ignore the cmd-window.  
Just switch back to SciTE to enter the data and see the output.

Stefan

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 20, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/scite-problem-with-gets-method/104599/3 "2007-05-20T15:40:50Z")

</div>

That works!

I actually had tried this before, but I think the confusion came from  
using the variable x and not the one I had just defined that made the  
error message so confusing. I guess I should stop my 2AM coding  
sessions.
