5

What do these errors mean?

[root@localhost config]# gem install bluecloth
Building native extensions.  This could take a while...
ERROR:  Error installing bluecloth:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
can't find header files for ruby.


Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/bluecloth-2.0.7 for 
inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/bluecloth-2.0.7/ext/gem_make.out
[root@localhost config]# 

And this

[root@localhost config]# gem install chronic
Successfully installed json_pure-1.4.3
Successfully installed rubyforge-2.0.4
Successfully installed hoe-2.6.0
Successfully installed chronic-0.2.3
4 gems installed
/usr/lib64/ruby/gems/1.8/gems/rdoc-2.5.8/lib/rdoc/ruby_lex.rb:67: warning: 
parenthesize argument(s) for future version
ERROR:  While executing gem ... (Gem::DocumentError)
    ERROR: RDoc documentation generator not installed: no such file to load -- irb/slex
[root@localhost config]# 

I have installed rdocs using "yum install ruby-rdocs". But I don't understand what this error means

Vineeth Pradhan
  • 8,201
  • 7
  • 33
  • 34

1 Answers1

17
yum install ruby-devel ruby-irb ruby-rdoc ruby-ri

Although the former command fixes both issues, take in mind that in the case of the second error message, you can had also skip the documentation by adding --no-rdoc.

April 2017:
--[no-]rdoc argument has been deprecated as explained in gem install --help. You now have to use --no-document at each gem installation or store this in your ~/.gemrc as explained in this answer.

Community
  • 1
  • 1
vise
  • 12,713
  • 11
  • 52
  • 64
  • 1
    Thanks that worked. And how can I get ruby-1.9.1 installed using yum? `yum install ruby --version=1.9.1` doesn't work. I get this error `No package ruby-1.9.1 available.` – Vineeth Pradhan May 26 '10 at 06:57
  • IIRC there are no 1.9.x ruby packages in fedora.. nor does it compile cleanly (disappointed as well). – vise May 26 '10 at 07:19
  • Okay, that's news. Anyway thanks, atleast my bigger problems are fixed – Vineeth Pradhan May 27 '10 at 10:38