Forum: Ruby HighLine problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3cab6e3dfe2dafb46913e660ec37c7c8?d=identicon&s=25 jogloran (Guest)
on 2006-03-30 13:31
(Received via mailing list)
I have a little application which uses the HighLine 1.2.0 gem: it's
worked
perfectly under Windows and Linux. When invoked in Mac OS X, however, I
get:

/opt/local/lib/ruby/gems/1.8/gems/highline-1.2.0/lib/highline.rb:576:in
`get_line': The input stream is exhausted. (EOFError)
        from
/opt/local/lib/ruby/gems/1.8/gems/highline-1.2.0/lib/highline.rb:596:in
`get_response'
        from
/opt/local/lib/ruby/gems/1.8/gems/highline-1.2.0/lib/highline.rb:177:in
`ask'
        from
/opt/local/lib/ruby/gems/1.8/gems/highline-1.2.0/lib/highline.rb:272:in
`choose'
        from lib2.rb:90:in `ask_action'
        from lib2.rb:22:in `initialize'
        from lib2.rb:21:in `initialize'
        from lib2.rb:303

when I try to read input.

This is ruby 1.8.4 (2005-12-24) [i686-darwin8.5.2].

I'd be happy to hear any ideas.

Thanks...

jogloran
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2006-03-30 19:04
(Received via mailing list)
On Mar 30, 2006, at 5:30 AM, jogloran wrote:

> I have a little application which uses the HighLine 1.2.0 gem: it's
> worked
> perfectly under Windows and Linux. When invoked in Mac OS X,
> however, I get:

HighLine is developed on OS X, so it *should* work OK there.  ;)

> highline.rb:272:in
> `choose'
>         from lib2.rb:90:in `ask_action'
>         from lib2.rb:22:in `initialize'
>         from lib2.rb:21:in `initialize'
>         from lib2.rb:303

This error was added recently as a "feature", to allow user code to
detect the end of a stream.  (It was intended mainly for scripts
reading from STDIN and wanting to notice a control-D/control-z
keystroke.)

> when I try to read input.
>
> This is ruby 1.8.4 (2005-12-24) [i686-darwin8.5.2].
>
> I'd be happy to hear any ideas.

Can you show me a simple example of how you are feeding the script
input when the error is triggered and the HighLine code involved?
(You can email me privately, so we don't disturb the list with our
bug hunt.)

James Edward Gray II
This topic is locked and can not be replied to.