On 2011-01-30, at 19:02, Luis Lavena wrote:

>>> RubyGems post_install is not scripts, perhaps you're using extension
>>> compilation to make that happen, which is intrusive to the user.
>> 
>> You are right, I use the extension compilation to run the extra install step.
>> How is this intrusive?

> If user grant RubyGems sudo to install the gem and it's dependencies,
> you're sneaking something that the user was not aware of.
> 
> If the user using a gem list find this gem he didn't install, on
> uninstallation no dependency warning will be triggered, and the
> original gem will not work because of that.

True.  I consider this a flaw and would very much like to solve that, too.

>>> You're also bringing Bundler when the user might not want it into the
>>> mix and slowing down the gem loading process.
>> 
>> I would rather add Bundler than not have the gem install all its dependencies.  The user experience is what matters, and this way all dependencies install correctly and the gem is ready for use regardless of the users platform.
> 
> This is similar case to what Hoe did in the past, as add it as
> dependency even that you used for development only. Search for it.

The difference is that Bundler is a good gem for setting up runtime dependencies.  It is not a development only gem.

>>> Bundler is awesome for development, but is awful for runtime
>>> dependency. You should not be imposing bundler to the user and even
>>> less for runtime execution.
>> 
>> Why not?  Bundler is awesome for runtime dependencies as well.  It is the default mechanism for Ruby On Rails runtime dependencies.

> http://www.ibrasten.com/articles/2010/11/15/reducing-jruby-startup-by-ditching-bundler

Good article, and valid if your main concern is application startup time.  My main concerns are ease of installation, and performance after startup.  Bundler fits that need.

>>> Also bundler do not handle properly all the platforms, using a
>>> different concept of "platform" of what RubyGems understand and is
>>> widely known.
>> 
>> The platform concept of Bundler is different from RubyGems platform, but Bundler handles all platforms properly and the platform concept of Bundler is as well known and as intuitive as RubyGems.
> 
> No, it doesn't, take for example JSON gem, is broken under 1.9.x or
> 1.8.x for Windows and even when the user decided to fix it manually,
> bundler always force it's installation.
> 
> https://github.com/carlhuda/bundler/issues/635
> https://github.com/carlhuda/bundler/issues/589


These are valid concerns, and it looks like they are being taken seriously, so hopefully they will be sorted out.  I appreciate your efforts on improving Ruby on Windows.

If your gem hits any of these issues, you need to address them, and maybe using Bundler is not your solution.  If your gem does not hit these issues, maybe you accept your gem will not be used on Windows, Bundler is a solution to the original problem of having a valid set of gems installed with your gem without the user having to do extra steps.

I would like to hear other solutions than using Bundler that enables the correct installation of dependent gems that vary with the user's platform.

--
With kind regards
Uwe Kubosch
Kubosch Consulting
uwe / kubosch.no
http://kubosch.no/