Error installing json with igem

When attempting:

igem install json

I get an error stating “ERROR: Failed to build gem native extension.”

I have installed some other gems ok and using the plain old Ruby “gem
install json” works.

Is there something I can do to workaround the problem?

Thanks,
Aaron

When you get that error it means that the gem depends on C extensions.
These
are not supported by IronRuby.

Shay.

On Sat, Jul 24, 2010 at 14:34, Aaron C. [email protected]
wrote:

I get an error stating “ERROR: Failed to build gem native extension.”

As Shay has already pointed out, you get this error when the gem that
you are trying to install depends on some native code.

Is there something I can do to workaround the problem?

You can install json_pure which is the pure-Ruby variant of the C
extension and works pretty well with IronRuby (it’s just slower…
well, way slower when parsing big json strings).

Alternatively you can try my port [1] to IronRuby of the json/ext
library. The port is pretty much complete and it is compatible with
json 1.1. It passes the whole test suite except for one assertion
defined in test_json_unicode.rb [2]. Right now I’m in the middle of a
complete revamp of the source code after a few months of hiatus
(fixing sloppy code here and there and getting rid of awful nasty
hacks needed to work around a few bugs in IronRuby pre-1.0), then I
will bump the compatibility to json 1.4.

[1] GitHub - nrk/ironruby-json: A port of Florian Frank's json library to IronRuby
[2] ironruby-json test suite results · GitHub


Daniele A.
http://clorophilla.net/
http://twitter.com/JoL1hAHN

Mark Rendle wrote:

You can use json_pure, which has no native code but provides all the
same classes and methods.

Thanks a lot for that tip, works perfectly.

You can use json_pure, which has no native code but provides all the
same classes and methods.

Mark

Sent from my iPhone