<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I have tried using gets and no input dialog pops up.  Here is my code:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>puts "this is a test"</DIV><DIV>puts gets</DIV><DIV>puts "end of test"</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I use Run Ruby, and here is the output:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(231, 240, 254); "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 10.7px;">this is a test</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(231, 240, 254); "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 10.7px;">puts "this is a test"</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(231, 240, 254); "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 10.7px;">end of test</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Bill</DIV><BR><DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 49px; text-indent: -49px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>From: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">William M Shobe <<A href="mailto:shobe@virginia.edu">shobe@virginia.edu</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 46px; text-indent: -46px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Date: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">September 29, 2005 10:28:59 AM EDT</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 32px; text-indent: -32px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>To: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica"><A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 66px; text-indent: -66px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Subject: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica"><B>[TxMt] Input from gets in Ruby</B></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 77px; text-indent: -77px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Reply-To: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">TextMate users <<A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Please excuse the simple question, but I am experimenting with TextMate and Ruby.<SPAN class="Apple-converted-space">  </SPAN>The output from running a Ruby script goes to a stdout window.<SPAN class="Apple-converted-space">  </SPAN>However, I can't figure out how to get input from the gets method.<SPAN class="Apple-converted-space">  </SPAN>Is there any way to read from stdin when running a Ruby script from the Run Command>Ruby>Run Ruby menu?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks for any help.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Bill Shobe</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 49px; text-indent: -49px; font: normal normal normal 14px/normal Helvetica; color: rgb(0, 0, 0); min-height: 17px; "><B></B><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 49px; text-indent: -49px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>From: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">Sune Foldager <<A href="mailto:cryo@cyanite.org">cryo@cyanite.org</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 46px; text-indent: -46px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Date: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">September 29, 2005 12:08:58 PM EDT</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 32px; text-indent: -32px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>To: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">TextMate users <<A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 66px; text-indent: -66px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Subject: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica"><B>Re: [TxMt] Input from gets in Ruby</B></FONT></DIV><DIV style="text-indent: -77px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><FONT class="Apple-style-span" color="#000000"><B><snip></B></FONT><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Yes, this happens automatically, but stdin is redirected to read input from a dialog which should pop up whenever your script does a gets or similar.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- Sune.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><snip><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 49px; text-indent: -49px; font: normal normal normal 14px/normal Helvetica; color: rgb(0, 0, 0); min-height: 17px; "><B></B><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 49px; text-indent: -49px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>From: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">Sune Foldager <<A href="mailto:cryo@cyanite.org">cryo@cyanite.org</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 46px; text-indent: -46px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Date: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">September 29, 2005 1:58:10 PM EDT</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 32px; text-indent: -32px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>To: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">Kumar McMillan <<A href="mailto:kumar.mcmillan@gmail.com">kumar.mcmillan@gmail.com</A>>, TextMate users <<A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 66px; text-indent: -66px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Subject: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica"><B>Re: [TxMt] Input from gets in Ruby</B></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 77px; text-indent: -77px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Reply-To: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">TextMate users <<A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On 29/09/2005, at 19.54, Kumar McMillan wrote:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">oh, hehe, it is just the Run Ruby command.<SPAN class="Apple-converted-space">  </SPAN>Sorry, I thought you meant</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">this was built into TextMate!</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Nope :-p, but it's built into the Run Python command also :-).</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- Sune.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV></BLOCKQUOTE><BR></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>