Is there anyway to find the C library dependency when installing a gem
containing a native extension?
For now my only solution is to do a ldd on the so file.
By example I know which C lib is needed by nokogiri by doing that:
linux-vdso.so.1 => (0x00007fff659ff000)
libruby-1.9.1.so.1.9 => /usr/lib/libruby-1.9.1.so.1.9
libexslt.so.0 => /usr/lib/x86_64-linux-gnu/libexslt.so.0
Then I can search in by ubuntu repo with apt-cache/apt-file.
I’d need that in order to package my app, the goal being to have a .deb
file with all my app code + all the gems (with or without native
extension) + dependencies in the .deb package for the C libraries
(libxml/libssl/whateevr is needed).
The build of the package will be done on the CI environment (it will run
the bundle install then put the above in the package).
So an apt-get install myapp will deploy my code (with vendor/bundle from
my bundle install) and install the C dependency (libsqlite3-dev by
Thanks for your help!