Kenno's openNOTE

My Programming Weblog

Debian JSON for Ruby

with 2 comments

I tried to install JSON for Ruby via RubyGem,

# gem install json

and I got the following error message:

Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.


/usr/bin/ruby1.8 extconf.rb install json
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.1.6 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.1.6/ext/json/ext/generator/gem_make.out

However, I found out in Debian, we can just install this library libjson-ruby:

$ sudo apt-get install libjson-ruby

Now, try to verify if it works:

$ irb
irb(main):001:0> require 'json'
=> true
irb(main):002:0>

Written by kenno

May 24, 2009 at 4:33 pm

Posted in Debian

Tagged with , ,

2 Responses

Subscribe to comments with RSS.

  1. [...] I tried to install JSON for Ruby via RubyGem,and I got the following error message: Building native extensions. This could take a while… ERROR: Error installing json: ERROR: Failed to build gem native extension. More here [...]

  2. Debian packaging FTW!

    jeremiah

    May 27, 2009 at 1:13 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.