views:

207

answers:

2

I am currently trying to install the gem nfoiled, which provides a ruby interface to ncurses. I do this by using gem install elliottcable-nfoiled as suggest in the README. Downloading it manually from the github repository and then installing it with rake install doesn't work because of a problem with the echoe-gem, thus I am bound to use the normal way.

Unfortunately it depends on the gem ncurses-0.9.1 which is only compatible with ruby 1.8, and thus I can't install nfoiled either (since it always tries to compile ncurses-0.9.1 first):

novavortex:/usr/src# gem install elliottcable-nfoiled
Building native extensions.  This could take a while...
...
form_wrap.c: In function `rbncurs_m_new_form':
form_wrap.c:395: error: `struct RArray' has no member named `len'
form_wrap.c: In function `rbncurs_c_set_field_type':
form_wrap.c:619: error: `struct RArray' has no member named `len'
form_wrap.c: In function `rbncurs_c_set_form_fields':
form_wrap.c:778: error: `struct RArray' has no member named `len'
form_wrap.c: In function `make_arg':
form_wrap.c:1126: error: `struct RArray' has no member named `len'
make: *** [form_wrap.o] Error 1


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1/gem_make.out
novavortex:/usr/src#

I managed to fix the problem in ncurses-0.9.1 (by replacing RARRAY(x)->len with RARRAY_LEN(x)) and to install it, but nfoiled still always tries to recompile it from a freshly downloaded source.

How can I install nfoiled without having it recompile ncurses first?

A: 

I was able to install ncurses-ruby it under ruby 1.9.2-head without any problems, I could not install the nfoiled gem because it requires a specific version of echoe.


$ gem install --source http://gems.github.com elliottcable-nfoiled
ERROR:  Error installing elliottcable-nfoiled:
        elliottcable-nfoiled requires ncurses (>= 0, runtime)

$ gem install ncurses
Building native extensions.  This could take a while...
Successfully installed ncurses-0.9.1
1 gem installed
Installing ri documentation for ncurses-0.9.1...
Installing RDoc documentation for ncurses-0.9.1...

$ gem install --source http://gems.github.com elliottcable-nfoiled
ERROR:  Error installing elliottcable-nfoiled:
        elliottcable-nfoiled requires echoe (>= 0, = 3.0.2, runtime)

Are you sure you have the right ncurses development headers so that the ruby bindings build?

duncan
His compile errors refer to structs in the Ruby interpreter, not in the ncurses library.
Ken Bloom
+2  A: 

You said you already fixed ncurses manually. You can then install the other gem without its dependencies with the --ignore-dependencies switch:

gem install elliottcable-nfoiled --ignore-dependencies
gix