Gem installation-time dependency

Is there a way to build a gem in such a way so that dependencies can be
resolved at installation-time?

I want users to be able to “gem install ruby-debug-ide”, and have the
ruby-debug-ide gem install either ruby-debug-base or ruby-debug-base19,
depending on the version of Ruby that they’re running.

I’m thinking maybe extconf.rb could do this, but just wanted to see if
anyone had any ideas.

Well, if anyone’s curious, I figured it out. Take a look at the
ruby-debug-ide19 gem. It works for both Ruby 1.8 and 1.9, detecting the
dependencies at install time.

On Aug 26, 2009, at 08:12, Mark M. wrote:

anyone had any ideas.
Why isn’t ruby-debug-base “fat” (containing both 1.8 and 1.9 code)?

See also:

http://tenderlovemaking.com/2009/05/07/fat-binary-gems-make-the-rockin-world-go-round/

Eric H. wrote:

On Aug 26, 2009, at 08:12, Mark M. wrote:

anyone had any ideas.
Why isn’t ruby-debug-base “fat” (containing both 1.8 and 1.9 code)?

See also:

http://tenderlovemaking.com/2009/05/07/fat-binary-gems-make-the-rockin-world-go-round/

I’d like it to be, but that’s up to Kent S. and Rocky B.,
the admins of that gem. I asked Rocky a few weeks ago about including my
changes into linecache, but he’s not comfortable with the approach that
I took. I admit that it’s hackish and needs to be revisited.

Mark

On Aug 26, 8:47 pm, Eric H. [email protected] wrote:

I’m thinking maybe extconf.rb could do this, but just wanted to see if
anyone had any ideas.

Why isn’t ruby-debug-base “fat” (containing both 1.8 and 1.9 code)?

See also:

http://tenderlovemaking.com/2009/05/07/fat-binary-gems-make-the-rocki

The approach Aaron took there has been integrated in rake-compiler
already, so is more easy now to generate fat binaries.

Cheers,