#313 ✓resolved
Jakub Suder

require same version of hobofields and hobosupport

Reported by Jakub Suder | October 24th, 2008 @ 04:00 PM

In the gemspec file, hobo declares hobofields and hobosupport requirements in version greater or equal to hobo version; IMHO, it would be better to require the same version as hobo. I.e. hobo-0.8.3.gemspec should declare hobosupport "= 0.8.3", not ">= 0.8.3".

Reasons:

  • it's probably not a good idea in general to have two libraries which are so closely connected loaded in two different versions...

  • this can cause an exception on application start, as it did in my case. I have hobo, hobosupport and hobofields installed both in version 0.8.2 and 0.8.3. I wanted to force my application to use the older versions, so I've added lines config.gem gemname, :version => '= 0.8.2' for those three libraries to environment. And this kept throwing an exception "can't activate hobosupport (= 0.8.2, runtime), already activated hobosupport-0.8.3", until I've changed the order of those lines... It turned out that while loading hobo, rubygems was reading the gemspec and finding that it requires hobosupport in version >= 0.8.2; so it loaded the newest matching version (0.8.3), and then in the next line it tried to load hobosupport 0.8.2. It started working when I changed the order (moved hobo after the dependencies), but it took me some time to figure this out. This wouldn't have happened if hobo 0.8.2 loaded hobosupport 0.8.2. That's also the way it's done in Rails libraries - all dependencies between acti* gems are using the '=' parameter, not '>='.

Comments and changes to this ticket

  • Tom Locke

    Tom Locke December 2nd, 2008 @ 10:21 AM

    • State changed from “new” to “resolved”

    Strange - I thought I responded to this yesterday but I don't see my comment.

    I agree with this idea and I've made the change

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages