Curses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Curses

keithrbennett
All -

I'm using curses in a Ruby app to display a periodically updating full screen text mode interface on an app running on servers without a graphical environment.

Curses is included in the standard distribution of MRI Ruby, but I just tried my app for the first time in JRuby, and it dies when requiring curses:

    LoadError: no such file to load -- curses

Is there a way for me to adapt JRuby to curses, which is, as I understand it, a C library?

Thanks,
Keith

Reply | Threaded
Open this post in threaded view
|

Re: Curses

Eric West
[JCurses, a java console windowing toolkit for Windows and Linux](http://sourceforge.net/projects/javacurses/) was the first result in a google search for `java curses`. There are probably others. Support for C-Extensions was removed from JRuby1.7.3, I believe. The options that come to mind are to use a java lib that provides curses support like the one I'm linking, or attempt to use FFI to interact with the C library . I think wrapping the java lib would be the easier task, personally.


On Mon, Aug 12, 2013 at 3:43 PM, Keith Bennett <[hidden email]> wrote:
All -

I'm using curses in a Ruby app to display a periodically updating full screen text mode interface on an app running on servers without a graphical environment.

Curses is included in the standard distribution of MRI Ruby, but I just tried my app for the first time in JRuby, and it dies when requiring curses:

    LoadError: no such file to load -- curses

Is there a way for me to adapt JRuby to curses, which is, as I understand it, a C library?

Thanks,
Keith


Reply | Threaded
Open this post in threaded view
|

Re: Curses

Wayne Meissner
In reply to this post by keithrbennett
There is ffi-ncurses (http://rubygems.org/gems/ffi-ncurses), which
runs on both CRuby and JRuby.  Not sure how complete it is, but worth
a try.


On 13 August 2013 06:43, Keith Bennett <[hidden email]> wrote:

> All -
>
> I'm using curses in a Ruby app to display a periodically updating full
> screen text mode interface on an app running on servers without a graphical
> environment.
>
> Curses is included in the standard distribution of MRI Ruby, but I just
> tried my app for the first time in JRuby, and it dies when requiring curses:
>
>     LoadError: no such file to load -- curses
>
> Is there a way for me to adapt JRuby to curses, which is, as I understand
> it, a C library?
>
> Thanks,
> Keith
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Curses

Jean Lazarou
I wrote a very basic curses library targeting Swing... it needs a lot of improvements, it covers what I needed: https://github.com/jeanlazarou/jruby_curses

It depends on the features you use.

-Jean

PS: I could improve it.



From: Wayne Meissner <[hidden email]>
To: [hidden email]
Sent: Tuesday, August 13, 2013 2:14 AM
Subject: Re: [jruby-user] Curses

There is ffi-ncurses (http://rubygems.org/gems/ffi-ncurses), which
runs on both CRuby and JRuby.  Not sure how complete it is, but worth
a try.


On 13 August 2013 06:43, Keith Bennett <[hidden email]> wrote:

> All -
>
> I'm using curses in a Ruby app to display a periodically updating full
> screen text mode interface on an app running on servers without a graphical
> environment.
>
> Curses is included in the standard distribution of MRI Ruby, but I just
> tried my app for the first time in JRuby, and it dies when requiring curses:
>
>    LoadError: no such file to load -- curses
>
> Is there a way for me to adapt JRuby to curses, which is, as I understand
> it, a C library?
>
> Thanks,
> Keith
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email