[Rubygems-developers] check gem version before gem installation? (or: how to add rubygem version dependencies now that there is no 'rubygems' gem?)
nate at natemurray.com
Thu Sep 18 15:33:45 EDT 2008
thanks for the quick reply. Maybe I can rephrase my question:
Is it possible to
1) require the user to have a particular version of rubygems installed
before they can install my gem?
2) give them a message on how to upgrade the rubygems system if they
do not meet the required version
On Thu, Sep 18, 2008 at 12:14 PM, Eric Hodel <drbrain at segment7.net> wrote:
> On Sep 18, 2008, at 11:02 AM, Nate Murray wrote:
>> Hey all,
>> I've just created a new gem. I'm using hoe 1.7.0 and it uses the
>> rubygems method "add_development_dependency" which was added approx
>> rubygems 1.2.0.
> I don't see what this has to do with your gem. There is a bug in RubyGems
> 1.2 with respect to development dependencies, but gems packaged with
> RubyGems 1.2 are backwards compatible with older RubyGems versions.
>> In order for my gem to install correctly it needs to run a rake task
>> to finish installation.
> You cannot run custom code upon installation of a gem.
>> If one installs the gem with rubygems version
>> < 1.2.0. Then 1) the gem will "install" (place files in the gems home)
>> but 2) the rake task fails because it cannot find the method
>> "add_development_dependency" and installation does not complete.
> If the user needs to run a task after installation via the Rakefile then you
> need a runtime dependency on hoe.
> If hoe isn't backwards compatible, then you need to file a bug against hoe.
>> As I understand it, I cannot just add a requirement of rubygems >=
>> 1.2.0 because there is no longer a rubygem gem. (is this accurate?)
> There never was a rubygems gem you could depend on. Use
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
More information about the Rubygems-developers