• Home »
  • Errors »
  • ERROR: RDoc documentation generator not installed: no such file to load — rdoc/rdoc

ERROR: RDoc documentation generator not installed: no such file to load — rdoc/rdoc

I recently setup a new server with Ruby and Rubygems however I received an error when attempting to install my first gem which happened to be ruby-lsapi. Below I explain the error including an example of the error in the output of installing a gem as well as what was done to resolve the error.

RDoc Error Installing Ruby Gem On CentOS Linux:

bash

  1. [root@dev rubygems-1.3.7]# gem install ruby-lsapi
  2. Building native extensions.  This could take a while...
  3. Successfully installed ruby-lsapi-4.0
  4. 1 gem installed
  5. ERROR:  While executing gem ... (Gem::DocumentError)
  6.     ERROR: RDoc documentation generator not installed: no such file to load -- rdoc/rdoc
  7. [root@dev rubygems-1.3.7]#

While the gem actually installed the documentation did not so it is an issue that should be resolved in case you ever need the documentation of a gem you are installing. Resolving this problem is done by installing the ruby-rdoc package which will have a dependency of ruby-irb. As you can see below the install is quick and can be completed by Yum depending on what repositories you have installed.

Install ruby-rdoc On CentOS Linux Via Yum:

bash

  1. [root@dev ~]# yum install ruby-rdoc
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4.  * addons: mirrors.xmission.com
  5.  * base: centos.mirror.facebook.net
  6.  * extras: mirrors.netdna.com
  7.  * updates: mirrors.versaweb.com
  8. Setting up Install Process
  9. Resolving Dependencies
  10. --> Running transaction check
  11. ---> Package ruby-rdoc.i686 0:1.8.6.111-1 set to be updated
  12. --> Processing Dependency: ruby-irb = 1.8.6.111-1 for package: ruby-rdoc
  13. --> Running transaction check
  14. ---> Package ruby-irb.i686 0:1.8.6.111-1 set to be updated
  15. --> Finished Dependency Resolution
  16.  
  17. Dependencies Resolved
  18.  
  19. ====================================================================================================================================
  20.  Package                          Arch                        Version                             Repository                   Size
  21. ====================================================================================================================================
  22. Installing:
  23.  ruby-rdoc                        i686                        1.8.6.111-1                         ruby                        137 k
  24. Installing for dependencies:
  25.  ruby-irb                         i686                        1.8.6.111-1                         ruby                         70 k
  26.  
  27. Transaction Summary
  28. ====================================================================================================================================
  29. Install       2 Package(s)
  30. Upgrade       0 Package(s)
  31.  
  32. Total download size: 206 k
  33. Is this ok [y/N]: y
  34. Downloading Packages:
  35. (1/2): ruby-irb-1.8.6.111-1.i686.rpm                                                                         |  70 kB     00:00
  36. (2/2): ruby-rdoc-1.8.6.111-1.i686.rpm                                                                        | 137 kB     00:00
  37. ------------------------------------------------------------------------------------------------------------------------------------
  38. Total                                                                                                91 kB/s | 206 kB     00:02
  39. Running rpm_check_debug
  40. Running Transaction Test
  41. Finished Transaction Test
  42. Transaction Test Succeeded
  43. Running Transaction
  44.   Installing     : ruby-irb                                                                                                     1/2
  45.   Installing     : ruby-rdoc                                                                                                    2/2
  46.  
  47. Installed:
  48.   ruby-rdoc.i686 0:1.8.6.111-1
  49.  
  50. Dependency Installed:
  51.   ruby-irb.i686 0:1.8.6.111-1
  52.  
  53. Complete!
  54. [root@dev ~]#

After installing ruby-rdoc I reinstalled the gem and this time the documentation installed without issue.

Install ruby-lsapi Gem On CentOS Linux:

bash

  1. [root@dev rubygems-1.3.7]# gem install ruby-lsapi
  2. Building native extensions.  This could take a while...
  3. Successfully installed ruby-lsapi-4.0
  4. 1 gem installed
  5. Installing ri documentation for ruby-lsapi-4.0...
  6. Installing RDoc documentation for ruby-lsapi-4.0...
  7. [root@dev rubygems-1.3.7]#

The RDoc error no longer occurs and the ruby-lsapi gem installs without issue.

Distributed Programming with Ruby (Paperback)


List Price: $44.99 USD
New From: $27.17 USD In Stock
Used from: $0.26 USD In Stock

Beginning Ruby: From Novice to Professional (Expert’s Voice in Open Source) (Paperback)


List Price: $39.99 USD
New From: $20.00 USD In Stock
Used from: $3.27 USD In Stock

Share