I am interested in creating a command line application with ruby that would require moderately complex interaction with the user. I would like to use ncurses for this.
What is the best gem for working with ruby and ncurses, or should I be using stdlib utilities in ruby?
Ruby includes bindings for the curses library. Despite what the name implies, it will use ncurses if possible.
Third party libraries often provide abstractions on top of either Ruby's curses or their own bindings. For example, ncursesw also wraps the panel, menu and form extensions. When I worked with Ruby's curses, I created my own Window class with proper border support.
If the basic methods are sufficient, I don't see any reason to add a dependency to your project. However, if you want to do fancy things more easily, you should use a library that provides support for what you need.
I have found ncursesw on this Rubygems seach. Seems to be a good gem to start with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With