代码之家  ›  专栏  ›  技术社区  ›  Patrick Glandien

修复ruby gem的外部依赖关系

  •  1
  • Patrick Glandien  · 技术社区  · 16 年前

    我目前正在尝试安装宝石 nfoiled ,它提供了一个到ncurses的ruby接口。 gem install elliottcable-nfoiled 如合同所示 自述 . 从github存储库手动下载,然后使用 rake install

    不幸的是,这取决于宝石 ncurses-0.9.1 它只与ruby 1.8兼容,因此我也不能安装nfoiled(因为它总是先编译ncurses-0.9.1):

    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#

    我在ncurses-0.9.1中解决了这个问题(通过替换RARRAY(x)—>使用RARRAY_len(x))并安装它,但nfiled仍然总是尝试从新下载的源代码重新编译它。

    2 回复  |  直到 16 年前
        1
  •  3
  •   gix    16 年前

    你说你已经修好了 ncurses 手动。然后,您可以安装另一个gem,而不依赖于 --ignore-dependencies 开关:

    gem install elliottcable-nfoiled --ignore-dependencies
    
        2
  •  0
  •   duncan    16 年前

    我能够在Ruby1.9.2-head下安装ncursesRubyIt,没有任何问题,我无法安装NfoiledGem,因为它需要特定版本的Echo。

    
    $ 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)
    

    您确定您有正确的ncurses开发头以便ruby绑定生成吗?

    推荐文章