gemspec: How to install a Ruby extension into GEM/lib/SOME_DIR/rather than GEM/lib/

Discussion in 'Ruby' started by Iñaki Baz Castillo, Feb 28, 2011.

  1. Hi, supposing a gemspec containing:

    Gem::Specification.new do |spec|
    spec.name =3D "xxx-handler"
    [...]
    spec.extensions =3D ["ext/xxx_parser/extconf.rb"]
    end


    when running "gem install xx-handler" the compiled extension
    xxx_parser.so is installed into GEMS_DIR/xxx-handler/lib/ directory.
    Is it possible to tell the gemspec file to install the extension in a
    subdirectory within GEMS_DIR/xxx-handler/lib/ ?

    Thanks a lot.


    --=20
    I=C3=B1aki Baz Castillo
    <>
     
    Iñaki Baz Castillo, Feb 28, 2011
    #1
    1. Advertising

  2. 2011/2/28 I=C3=B1aki Baz Castillo <>:
    > when running "gem install xx-handler" the compiled extension
    > xxx_parser.so is installed into GEMS_DIR/xxx-handler/lib/ directory.
    > Is it possible to tell the gemspec file to install the extension in a
    > subdirectory within GEMS_DIR/xxx-handler/lib/ ?


    Solved. Using "create_makefile(dir/name)" does the work (thanks to Luis Lav=
    ena).

    --=20
    I=C3=B1aki Baz Castillo
    <>
     
    Iñaki Baz Castillo, Feb 28, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Burt

    Rubygems Gemspec question

    Dave Burt, Sep 5, 2005, in forum: Ruby
    Replies:
    2
    Views:
    99
    Dave Burt
    Sep 5, 2005
  2. Reid Morrison
    Replies:
    1
    Views:
    123
    Reid Morrison
    Jan 19, 2007
  3. Christophe Mckeon

    GemSpec extension binary install directory

    Christophe Mckeon, Mar 29, 2007, in forum: Ruby
    Replies:
    0
    Views:
    119
    Christophe Mckeon
    Mar 29, 2007
  4. Rob Sanheim
    Replies:
    13
    Views:
    234
    Ron Green
    Feb 6, 2010
  5. Mike Dalessio

    [ANN] hoe-gemspec 1.0.0 Released

    Mike Dalessio, Sep 3, 2010, in forum: Ruby
    Replies:
    0
    Views:
    111
    Mike Dalessio
    Sep 3, 2010
Loading...

Share This Page