Compiled ruby fails to find curses
- by Hamish Downer
I'm attempting to install the sup MUA but I'm having trouble. When I try to run it, it can't find curses:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- curses (LoadError)
...
I am installing on a server running CentOS 5. I have compiled ruby and rubygems from source, and then installed sup using rubygems. I followed this article to compile ruby.
I have found having a similar problem on ubuntu. The fix suggested there is to install libcurses-ruby, but I can't find a similarly named package in CentOS. I have installed the ncurses-devel package, as that was required for installing sup using gem. I have also installed the ncurses, cursesx and rbcurse gems, but none of these have fixed the problem.
The article above about compiling ruby said you had to recompile the zlib extension, after doing:
cd ext/zlib
sudo ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
cd ../..
sudo make
sudo make install
So I've tried a few variants in ext/curses. The top few lines of ext/curses/extconf.rb are
require 'mkmf'
dir_config('curses')
dir_config('ncurses')
dir_config('termcap')
So I've tried a few variants of setting paths:
sudo ruby extconf.rb --with-curses-include=/usr/include --with-curses-lib=/usr/lib --with-ncurses-include=/usr/include --with-ncurses-lib=/usr/lib --with-termcap-lib=/lib
sudo ruby extconf.rb --with-curses-include=/usr/include --with-curses-lib=/usr/lib --with-termcap-lib=/lib
and re-doing the make, but to no avail as yet. Any ideas to move it forward are welcome.