How do we find the gem is platform specific or using the ruby API?

Hi, I am so new to Ruby and have questions about Ruby packages.

Is there any file that I can see if the gem is platform specific? Do I
need to look at the gemspec file and determine?
Is there a way to find out if the gem is using Ruby API or not?? Do I
always need to analyze the source code of the gem to find this out??

Is there a metadata that I can find these information about gems??

I would really appreciate of your help! Thanks

Could you not use more than one ‘?’ please?

Anyway, as for your questions:

  • Ruby code is usually portable. My ruby code works on Windows fine.
    This is of course not true for some C extensions and stuff, but for pure
    ruby code, I think 98% of the time it will work on Windows too.

  • The .gemspec file does not contain a lot of information, but Gem
    command makes use of it and builds up a dependency tree. Obtaining the
    dependencies is a bit annoying … I think the rubygems team will make
    it simpler one day but for now, something like this should work:

    x =
    Gem::Commands::DependencyCommand.new.gem_dependency(‘name_or_path_to_the_gem_here’],
    nil, nil)

Two other commands that may be useful if you need that are:

.matching_specs.uniq.sort
.fetch_remote_specs(dependency).uniq.sort

The first you’d have to invoke on x object so:

x.matching_specs.uniq.sort

Just inspect this in irb, then you understand.

Your question about “if the gem is using Ruby API” does not seem to make
a lot of sense to me. Are you talking about the Ruby C API? If so, I
would assume that all extensions in Ruby must use the Ruby C API anyway,
as otherwise you could not get a handle on it (e. g. via DataStructWrap
or something like that)