buildr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shane Witbeck" <sh...@digitalsanctum.com>
Subject Re: net-ssh, net-sftp and buildr
Date Tue, 10 Jun 2008 00:14:23 GMT
Assaf,

Thanks for the response. Based on your suggestions I think it will be
easier to just rewrite the class with the new API changes.

Shane

On Mon, Jun 9, 2008 at 5:41 PM, Assaf Arkin <arkin@intalio.com> wrote:
> On Mon, Jun 9, 2008 at 2:00 PM, Shane Witbeck <shane@digitalsanctum.com> wrote:
>> I'm attempting to update some extended buildr code to work with
>> 1.3.1.1. The code in question was coded against 1.2.10 AND the older
>> 1.x versions of net-ssh and net-sftp. The upgrade to buildr 1.3.1.1
>> requires the 2.x versions of net-ssh and net-sftp but I'd like to
>> stick with the 1.x versions for the old extended code until I have a
>> chance to update for 2.x versions. Note that there were some major
>> changes to the net-sftp which are not backward compatible.
>>
>> My question is: Is there a way to load the 2.x gem versions of net-ssh
>> and net-sftp for buildr and load the older 1.x versions for a specific
>> class? I've tried the following:
>
> By the time the buildfile loads, Buildr already loaded Net::SSH from
> the new version of the gem, you'll need a bit of work to make Ruby
> forget about the class, loaded files, dependencies, etc.  Might be
> more pain than gain.
>
>>
>> require 'rubygems'
>> gem 'net-ssh', '=1.1.2'
>> require 'net/ssh'
>> require 'net/ssh/version'
>> gem 'net-sftp', '=1.1.0'
>> require 'net/sftp'
>> require 'find'
>>
>> this results in something like....
>>
>> can't activate net-ssh (=1.1.2), already activated net-ssh-2.0.1
>>
>>
>> Any suggestions that don't involve rewriting the 1.x dependent class?
>
> Create your own version of Buildr, comment out any net-ssh dependency
> you find in transport.rb, change the dependency in buildr.gemspec to
> 1.1.2, and rake install.
>
> Assaf
>
>>
>> --
>> -Shane
>



-- 
-Shane

Mime
View raw message