From: Eric Christopherson Date: 2010-03-12T07:21:21+09:00 Subject: Re: Can't install gems with native extensions On Thu, Mar 11, 2010 at 1:50 PM, Nikita Vasilyev wrote: > ➤ gem install rdiscount > Building native extensions.  This could take a while... > ERROR:  Error installing rdiscount: >  ERROR: Failed to build gem native extension. > > /usr/local/bin/ruby extconf.rb > WARNING: JRuby does not support native extensions or the `mkmf' library. >         Check wiki.jruby.org for alternatives. > extconf.rb:3: undefined method `dir_config' for main:Object > (NoMethodError) > > > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/rdiscount-1.6.3 for inspection. > Results logged to > /usr/local/lib/ruby/gems/1.8/gems/rdiscount-1.6.3/ext/gem_make.out > > > > I've the same problem with RedCloth. > I don't even use jruby. > > ➤ ruby --version > ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0] Is it possible you have Jruby installed anyway? It sounds like Jruby's version of gem is running. Try `which gem` or `gem env` to find out. If it is Jruby's gem, try putting MRI ahead of it in your $PATH.