This project is archived and is in readonly mode.

#780 ✓wontfix
epitron

"rake gems:install" doesn't work if plugins are missing gem dependencies

Reported by epitron | August 7th, 2008 @ 11:39 PM | in 2.x

It's a bit of a catch-22 -- you can't install the plugins' gems until the plugins' gems are installed. :)

I looked at the gems:install task, and the problem is that it depends on :environment.

So, I'm thinking a possible solution is to create an new rake dependency: "environmentwithoutplugins".

Anyone got any advice so I can start patching this baby? :)

Comments and changes to this ticket

  • CS Merritt (csmosx)

    CS Merritt (csmosx) August 21st, 2008 @ 03:49 AM

    I'm not so fond of the environmentsansplugins idea, because I'd rather a hook plugin devs can put in their init.rb or whathaveyou that adds the dependencies to rake gems.

    Anywho... webficient put up a dirty hack offering by Dan Munk.

    Essentially hack the plugin where it calls for the gem and require it only if its module has been defined.

    
    require 'pdf/writer' if defined? PDF::Writer
    

    Of course that wouldn't make for very good error tracing should you run it without first running rake gems, but I rather having rake gems run correctly.

  • josh

    josh November 22nd, 2008 @ 06:51 PM

    • State changed from “new” to “wontfix”

    Interesting, I'm not sure this is an easy fix though.

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages