From: Luis Lavena Date: 2011-01-30T03:00:24+09:00 Subject: Re: how to build gem whose dependencies depend of the platform? On Jan 29, 8:16 am, Jarmo Pertman 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