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

  • Thread starter Iñaki Baz Castillo
  • Start date
I

Iñaki Baz Castillo

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
<[email protected]>
 
I

Iñaki Baz Castillo

2011/2/28 I=C3=B1aki Baz Castillo said:
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
<[email protected]>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top