Installing ncurses for ruby on Windows

前端 未结 7 2058
不思量自难忘°
不思量自难忘° 2021-01-13 01:38

I am trying to install ncurses for ruby on windows. I have not installed ncurses before on my machine. I thought that having the \"ruby devkit\", it had asked for would be e

7条回答
  •  误落风尘
    2021-01-13 02:06

    I've managed to do it for ruby 2.2, which doesn't come with curses by default, but it took me a while:

    • Download PDCurses from SourceForge;
    • Unzip it;
    • Copy it's contents to a folder where ruby can see it. I'm not sure which one I used, I think I copied it to multiple ones until it worked. ruby -e 'puts $:' might help;
    • Install curses, gem instal curses. If the previous step was wrong, this will fail;
    • Done :D

    This method didn't work for other gems, like ffi-ncurses. Tip: most of curses functionality comes from the Window class, which comes with curses by default.

提交回复
热议问题