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 enough, but now I am being asked to specify options... I don't know which options to pick, or if I need to do/install other things for the gem to get installed:
C:\Ruby193\Devkit>gem install ncurses -- --ruby=C:/Ruby193/bin/ruby --without-make-prog --without-opt-dir
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing ncurses:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --ruby=C:/Ruby193/bin/ruby --without-make-prog --without-opt-dir
C:/Ruby193/lib/ruby/1.9.1/shellwords.rb:35:in `shellsplit': undefined method `scan' for false:FalseClass (NoMethodError)
from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:2216:in `<top (required)>'
from C:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:22:in `<main>'
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1/./gem_make.out
WHAT A PAIN, I just want to get this gem installed so I can run this:
require 'curses'
cols = Curses.stdscr.maxx
msg = "random_string"
str = msg.center(msg.length + cols - msg.length - 5 - 3)
puts "<!-- #{str}-->"
Updated version:
gem install curses --platform=ruby -- --with-ncurses-dir="C:\ncurses"
C:\ncurses can be any directory
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