Gemspec dependencies, not honored until too late?

When I clean out all my gems and do a “gem install veewee” I get the
error

ERROR: Error installing veewee-0.3.12.gem:
grit requires mime-types (~> 1.15, runtime)

I gem list and see mime-types 2.0 installed. If I install mime-types -v
1.16, veewee installs fine, so there’s a dependency problem here to fix
right?

Two of veewees deps dep on mime-types:
fog >=0 mime-types
grit ~> 1.15 mime-types

My spec file has a requirement for mime-types ~> 1.16 which should block
2.0
https://github.com/braddeicide/veewee/blob/master/veewee.gemspec

This didn’t work however, 2.0 is still installed and gem drops out.

It seems gem is installing fog first and reading the first
requirement of mime-types >=0 and installing the latest mime-types, it
then fails when it gets to grit and its non 2.0 requirement.

So gem doesn’t consider all dependencies when installing multiple
packages or it’d choose the 1.x branch which would satisfy everything,
but it’s strange it doesn’t even consider the first,main gems
dependencies until the end? Am I missing something? Is there a way to
make gem consider deps before its too late?

I complain to friends about how often gem installs fail and would like
to do my bit to fix these situations :). I also noticed that after the
2.0 error i can just uninstall mime-types, the later deps correctly
install 1.16. (I used 1.16 instead of 1.15 because fog has a dep on 1.16
now in its github specfile)

I believe I’ve solved this one myself, I moved the mime-types
add_dependency above fog. I’m been spoilt by package management tools
that work out order :slight_smile:

On Jan 7, 2014, at 16:33, Bradley J. [email protected] wrote:

I believe I’ve solved this one myself, I moved the mime-types
add_dependency above fog. I’m been spoilt by package management tools
that work out order :slight_smile:

Please file a bug

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs