Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Do you still need activesupport as a gem dependency? It breaks stuff...

#251

I see this ticket:

http://sod.lighthouseapp.com/pro...

And this commit:

http://github.com/mislav/will_pa...

I'm wondering if we can remove it safely now, because it causes us problems.

Here is our specific problem:

  • We explicitly activate all gem versions before rails initializes (via config/preinitializer.rb).

  • We sometimes activate an older version of rails than is installed on the box (e.g. app is still using rails 2.1.0 but 2.1.1 is installed as well)

  • If mislav-will_paginate is activated before rails (which happens if you go in alphabetical order), the highest version of activesupport (2.1.1) will be activated. This causes the subsequent activation of rails 2.1.1 to fail, because rails 2.1.0 tries to activate activesupport 2.1.0, which fails because you can only activate one version of a gem at a time.

Since will_paginate can only operate in the context of Rails, it doesn't seem to make sense for it to explicitly define a sub-dependency of rails as one of its dependencies.

So, unless there is a reason to keep this dependency, can we remove it?

Thanks, -- Chad

Reported by Chad Woolley · October 30th, 2008 @ 01:58 AM

State: resolved
Milestone: none
Assigned to: Mislav Mislav

Activity

  1. Mislav
    Mislav
    • State changed from new to resolved

    Your last point is valid. The gem dependency only caused problems. Although you shouldn't load will_paginate before Rails! Then you need an extra WillPaginate::enable after the framework loads.

    See e548631. Github should rebuild the gem shortly.

    October 30th, 2008 @ 10:12 AM

  2. Chad Woolley
    Chad Woolley

    Thanks for the prompt response.

    Not sure about the "enable" comment, though.

    We only activate the gems in preinitializer, which means calling the rubygems 'gem' method to put the gems' specified entries on the load path.

    They don't get required until the normal will_paginate require call in the initializer/environment.rb.

    So, it shouldn't matter what order they are activated in, or put on the load path, as long as they are required in the correct order. At least, I think this should be the case unless some very bad un-namespaced promiscuous monkey-patching is going on. Right?

    October 30th, 2008 @ 10:26 AM

  3. Mislav
    Mislav

    Oh, I missed that you said "activate your gems" instead of "require". All is well ;)

    October 30th, 2008 @ 12:24 PM

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.