On Jan 29, 8:16=A0am, Jarmo Pertman <jarm... / gmail.com> wrote:
> Ok, but this is not best solution also since user:
> 1) gem install mylib
> 2) create a script and `require "mylib"`
> 3) run that script
> 4) get an error about missing dependency
> 5) nevertheless of just running gem install, user needs to run gem
> install again
>
> It just feels not user friendly way to solve it. Another way would be
> to create separate gems of course, but it's not a good way either.
>

You can display a post_install message after you installed "mylib"
that tells:

mylib depends on platform specific components, please install "mylib-
windows" before you start using it.

And still rescue on the LoadError.

The other way around is what I mentioned, but then you will need to
generate one gem for every RubyGems platform: linux, darwin, freebsd,
mingw32, mswin32, etc and indicate the proper dependencies.

Even if the gem itself is not different.

I feel that is more work to do, don't you think?

--
Luis Lavena