Fix an external dependency of a ruby gem

Posted by Patrick Daryll Glandien on Stack Overflow See other posts from Stack Overflow or by Patrick Daryll Glandien
Published on 2010-04-28T13:34:34Z Indexed on 2010/04/28 15:13 UTC
Read the original article Hit count: 338

Filed under:
|
|
|
|

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?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about gem