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 -- Posted via http://www.ruby-forum.com/.
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 3:34 PM, Aaron Clauson <lists at ruby-forum.com> wrote:> 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 > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100724/52a9445d/attachment.html>
You can use json_pure, which has no native code but provides all the same classes and methods. Mark Sent from my iPhone On 24 Jul 2010, at 13:34, Aaron Clauson <lists at ruby-forum.com> wrote:> 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 > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core
On Sat, Jul 24, 2010 at 14:34, Aaron Clauson <lists at ruby-forum.com> 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] http://github.com/nrk/ironruby-json [2] http://gist.github.com/303469 -- Daniele Alessandri http://clorophilla.net/ http://twitter.com/JoL1hAHN