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:
- [root@dev rubygems-1.3.7]# gem install ruby-lsapi
- Building native extensions. This could take a while...
- Successfully installed ruby-lsapi-4.0
- 1 gem installed
- ERROR: While executing gem ... (Gem::DocumentError)
- ERROR: RDoc documentation generator not installed: no such file to load -- rdoc/rdoc
- [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:
- [root@dev ~]# yum install ruby-rdoc
- Loaded plugins: fastestmirror
- Loading mirror speeds from cached hostfile
- * addons: mirrors.xmission.com
- * base: centos.mirror.facebook.net
- * extras: mirrors.netdna.com
- * updates: mirrors.versaweb.com
- Setting up Install Process
- Resolving Dependencies
- --> Running transaction check
- ---> Package ruby-rdoc.i686 0:1.8.6.111-1 set to be updated
- --> Processing Dependency: ruby-irb = 1.8.6.111-1 for package: ruby-rdoc
- --> Running transaction check
- ---> Package ruby-irb.i686 0:1.8.6.111-1 set to be updated
- --> Finished Dependency Resolution
- Dependencies Resolved
- ====================================================================================================================================
- Package Arch Version Repository Size
- ====================================================================================================================================
- Installing:
- ruby-rdoc i686 1.8.6.111-1 ruby 137 k
- Installing for dependencies:
- ruby-irb i686 1.8.6.111-1 ruby 70 k
- Transaction Summary
- ====================================================================================================================================
- Install 2 Package(s)
- Upgrade 0 Package(s)
- Total download size: 206 k
- Is this ok [y/N]: y
- Downloading Packages:
- (1/2): ruby-irb-1.8.6.111-1.i686.rpm | 70 kB 00:00
- (2/2): ruby-rdoc-1.8.6.111-1.i686.rpm | 137 kB 00:00
- ------------------------------------------------------------------------------------------------------------------------------------
- Total 91 kB/s | 206 kB 00:02
- Running rpm_check_debug
- Running Transaction Test
- Finished Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Installing : ruby-irb 1/2
- Installing : ruby-rdoc 2/2
- Installed:
- ruby-rdoc.i686 0:1.8.6.111-1
- Dependency Installed:
- ruby-irb.i686 0:1.8.6.111-1
- Complete!
- [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:
- [root@dev rubygems-1.3.7]# gem install ruby-lsapi
- Building native extensions. This could take a while...
- Successfully installed ruby-lsapi-4.0
- 1 gem installed
- Installing ri documentation for ruby-lsapi-4.0...
- Installing RDoc documentation for ruby-lsapi-4.0...
- [root@dev rubygems-1.3.7]#
The RDoc error no longer occurs and the ruby-lsapi gem installs without issue.
thanks for that hint, man :D
Hello gback0ff,
No problem at all. Thanks for taking the time to leave feedback.
Thanks.
alex