Thanks all

I'd found the gemspec, but editing it doesn't work. In fact I can edit that 
line to be syntactically invalid and it still works, or rather doesn't work in 
the same way - so I guess that I need to do something to update a cache 
somewhere?

In the meantime I've had some success pre-loading the gem with 

jruby --1.9 -r json -S buildr

but I'm not sure that 1.9 is reliable enough, and json isn't recognized as a 
gem with 1.8

D

On 21 Jun 2010, at 20:02, Rhett Sutphin wrote:

> Hi,
> 
> On Jun 21, 2010, at 1:05 PM, Alex Boisvert wrote:
> 
>> The issue has to do with Gem initialization order...
>> 
>> Easiest would probably to edit the gemspec to allow this combination.  (On
>> my system, it's located under /usr/lib/ruby/gems/1.8/gems/buildr-1.4.0/;
>> your system may place gems elsewhere)
> 
> Another option which I will note for completeness is to use cucumber 0.7.3, 
> which depends on json_pure 1.2.4 or later only.  If you don't need any 
> cucumber 0.8.x features this will allow you to use a stock version of buildr.
> 
> For the buildr devs: this seems like another instance where having a separate 
> bugfix vs. features track for buildr would come in handy.  It would be 
> possible to update the dependencies as new versions are vetted to work with 
> buildr so that workarounds like this aren't necessary.
> 
> Rhett
> 
>> 
>> Index: buildr.gemspec
>> ===================================================================
>> --- buildr.gemspec    (revision 954999)
>> +++ buildr.gemspec    (working copy)
>> @@ -48,12 +48,12 @@
>> 
>>  # Tested against these dependencies.
>>  spec.add_dependency 'rake',                 '0.8.7'
>>  spec.add_dependency 'builder',              '2.1.2'
>>  spec.add_dependency 'net-ssh',              '2.0.15'
>>  spec.add_dependency 'net-sftp',             '2.0.2'
>>  spec.add_dependency 'rubyzip',              '0.9.1'
>>  spec.add_dependency 'highline',             '1.5.1'
>> -  spec.add_dependency 'json_pure',            '1.4.0'
>> +  spec.add_dependency 'json_pure',            '>= 1.4.0'
>>  spec.add_dependency 'rubyforge',            '2.0.3'
>>  spec.add_dependency 'hoe',                  '2.3.3'
>>  spec.add_dependency 'rjb',                  '1.2.5' if spec.platform.to_s
>> == 'ruby'
>> 
>> alex
>> 
>> On Mon, Jun 21, 2010 at 10:25 AM, Duncan McGregor 
>> <[email protected]>wrote:
>> 
>>> Hi
>>> 
>>> I'm trying Buildr for a new project and very much liking what I find (usual
>>> ant / Maven refugee status applies).
>>> 
>>> I'd like to run some Cucumber tests using Buildr under JRuby on MacOs. But
>>> when I
>>> 
>>> require 'cucumber'
>>> 
>>> in my buildfile, I get
>>> 
>>> Gem::LoadError : can't activate json_pure (~> 1.4.3, runtime) for
>>> ["cucumber-0.8.3"], already activated json_pure-1.4.0 for
>>> ["buildr-1.4.0-java"]
>>> 
>>> I've used Cucumber under Rake and 'normal' Ruby without incident, but
>>> obviously without such nice Java support. Can suggest how to persuade buildr
>>> to use a later version of json_pure?
>>> 
>>> Cheers
>>> 
>>> Duncan McGregor
>>> 
>>> 
>>> 
> 

Reply via email to