# SciTE Hangs with gets()

**URL:** <https://www.ruby-forum.com/t/scite-hangs-with-gets/173106>\
**Category:** Ruby\
**Created:** [August 2, 2009, 11:24pm UTC](https://www.ruby-forum.com/t/scite-hangs-with-gets/173106 "2009-08-02T23:24:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iggymac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d2c977/32.png) [@iggymac](https://www.ruby-forum.com/u/iggymac)\
**Post date:** [August 2, 2009, 11:24pm UTC](https://www.ruby-forum.com/t/scite-hangs-with-gets/173106/1 "2009-08-02T23:24:56Z")

</div>

I’m new to ruby, and coming from a C++/C# world it would be wonderful if  
I could get the SCiTE editor to work properly (even though I miss  
intellisense). I’ve searched around and I’ve only seen other people post  
that they have an issue with SciTE hanging when using gets() but I  
haven’t seen a solution.

I’m running Ruby 1.8.6 under Windows Vista 64-bit, btw.

Google has failed me (even though the only thread I found said it was a  
well discussed issue). I’m hoping someone here might have a possible  
solution, or a link to a site addressing the issue.

---

<div class="post-metadata">

**Author:** ![iggymac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d2c977/32.png) [@iggymac](https://www.ruby-forum.com/u/iggymac)\
**Post date:** [August 3, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/scite-hangs-with-gets/173106/2 "2009-08-03T14:30:50Z")

</div>

On Aug 2, 5:26 pm, Jeffrey Van alstine [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m new to ruby, and coming from a C++/C# world it would be wonderful if  
> I could get the SCiTE editor to work properly (even though I miss  
> intellisense).

Since you’re obviously used to an IDE, why not try a Ruby IDE like  
NetBeans Ruby Edition or RubyMine?

---

<div class="post-metadata">

**Author:** ![iggymac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d2c977/32.png) [@iggymac](https://www.ruby-forum.com/u/iggymac)\
**Post date:** [August 3, 2009, 5:35am UTC](https://www.ruby-forum.com/t/scite-hangs-with-gets/173106/3 "2009-08-03T05:35:52Z")

</div>

On Aug 2, 5:26 pm, Jeffrey Van alstine [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## solution, or a link to a site addressing the issue.
> 
> Posted viahttp://www.ruby-forum.com/.

Ha. I’m the one who said it was well-discussed. If the problem is  
still what it used to be (something between SciTE and stdin), try  
adding this to the top of your source:

$stdin.sync = true

I got that from the same thread I said this was well-worn territory:  
[Gets() makes my Ruby hang...? - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/101677#223367) (For some reason, I  
couldn’t find that thread in Google G…)

Have you tried that?

HTH,  
Chris

---

<div class="post-metadata">

**Author:** ![iggymac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/d2c977/32.png) [@iggymac](https://www.ruby-forum.com/u/iggymac)\
**Post date:** [August 4, 2009, 7:59am UTC](https://www.ruby-forum.com/t/scite-hangs-with-gets/173106/4 "2009-08-04T07:59:44Z")

</div>

Chris S. wrote:

> On Aug 2, 5:26ï¿½pm, Jeffrey Van alstine [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > ## solution, or a link to a site addressing the issue.
> > 
> > Posted viahttp://www.ruby-forum.com/.
> 
> Ha. I’m the one who said it was well-discussed. If the problem is  
> still what it used to be (something between SciTE and stdin), try  
> adding this to the top of your source:
> 
> $stdin.sync = true
> 
> I got that from the same thread I said this was well-worn territory:  
> [Gets() makes my Ruby hang...? - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/101677#223367) (For some reason, I  
> couldn’t find that thread in Google G…)
> 
> Have you tried that?
> 
> HTH,  
> Chris

I did try the things posted in that thread, but setting sync had no  
effect. The one that did work was

$stdout.flush

but it only worked for the very next gets(). You have to pair to run  
that line before every single gets(), which is just a pain in the butt  
when you’re trying to get a handle on the language.
