Can't install gems with native extensions


N

Nikita Vasilyev

➤ 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]
 
Ad

Advertisements

E

Eric Christopherson

=E2=9E=A4 gem install rdiscount
Building native extensions. =C2=A0This could take a while...
ERROR: =C2=A0Error installing rdiscount:
=C2=A0ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 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.

=E2=9E=A4 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.
 
N

Nikita Vasilyev

Eric said:
Is it possible you have Jruby installed anyway?

Yes.

➤ which jruby
/usr/local/bin/jruby

I just removed it, but it doesn't help

➤ rm -rf /usr/local/bin/jruby
➤ jruby
-bash: jruby: command not found
➤ gem install rdiscount
... same error ...
Try `which gem` or `gem env` to find out.

➤ which gem
/usr/local/bin/gem
➤ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-9
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /Users/nikitavasilev/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/",
"http://gems.github.com", "http://gemcutter.org/"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com
- http://gemcutter.org/


Can't see problem here.
 
N

Nikita Vasilyev

I've jruby installed via Homebrew. I've removed it and re-install ruby.
Now all works fine.
 
Ad

Advertisements

M

Matt W.

I've jruby installed via Homebrew. I've removed it and re-install ruby.
Now all works fine.

I'm getting this same error, but I would like to find a fix if anyone
has any ideas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top