requirements for native gems not free text?
Gary Weaver
garysweaver at gmail.com
Wed Jan 30 17:42:44 UTC 2013
On Wed, Jan 30, 2013 at 12:00 PM, Gary Weaver <garysweaver at gmail.com> wrote:
>
> Do you know (so- not for c compilation/not in extconf.rb, but just
> something you could call to get a list of loaded libraries).
>
(note: otool mentioned before is specific to xcode/xcode cmd line utils.)
Answering my own question- requires shelling out, but for OS X:
`vmmap
#{Process.pid}`.scan(/"([^"]+)"|(\S+)/).flatten.compact.delete_if{|s|
s.length > 0 && s[0] != '/'}
lists all the dylibs, bundles, ruby's exe.
And in linux:
`pmap #{Process.pid}`.scan(/"([^"]+)"|(\S+)/).flatten.compact.delete_if{|s|
s.length > 0 && s[0] != '/'}
In Windows I think need to use listdlls available at:
http://technet.microsoft.com/en-us/sysinternals/bb896656.aspx
which maybe could be packaged in the gem. Have not tried it, but I think it
lists for the current process, so could list for ruby?
Anyway, I'll shut up now.
More information about the RubyGems-Developers
mailing list