This project is archived and is in readonly mode.

#5781 ✓stale

rails install fails to produce rdocumentation

Reported by MartinH | October 11th, 2010 @ 11:03 AM

I just tried to install rails 3.0. and the install process failed to produce the rdocs.
While this is an error produced by builder, it is the one that is produced by the rails gem that caused the rdoc production failure. I've successfully created the other docs successfully.

I'm using rvm, with a gemset created for rails 3.0.0 using ruby 1.8.7.
The gem environment is as follows:
polaris:v2.3 martin$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0] - INSTALLATION DIRECTORY: /Users/martin/.rvm/gems/ruby-1.8.7-p302@rails300 - RUBY EXECUTABLE: /Users/martin/.rvm/rubies/ruby-1.8.7-p302/bin/ruby - EXECUTABLE DIRECTORY: /Users/martin/.rvm/gems/ruby-1.8.7-p302@rails300/bin - RUBYGEMS PLATFORMS:

- ruby
- x86-darwin-10

The last info that is produced by 'gem install rails-v 3.0.0' is
Installing ri documentation for rails-3.0.0...
File not found: lib

gem rdoc rails produces the same error:
Installing ri documentation for rails-3.0.0...
File not found: lib

Comments and changes to this ticket

  • Aditya Sanghi

    Aditya Sanghi October 11th, 2010 @ 11:50 AM

    • Importance changed from “” to “Low”

    I can't seem to reproduce this issue on Mac OSX on 1.8.7 with Rails 3.0.0

    The only difference it seems is i've set my 1.8.7 to ruby-1.8.7-head.

    Martin, could you try to run it against 1.8.7-head? It would help to isolate the problem with ruby versions perhaps?

  • Santiago Pastorino

    Santiago Pastorino October 11th, 2010 @ 02:10 PM

    • Assigned user set to “Xavier Noria”
  • MartinH

    MartinH October 12th, 2010 @ 08:48 AM

    I've installed 1.8.7-head as requested and re-installing the rails 3.0.0 gem against it; same result. (Btw, OSX is 10.6.4)

    polaris:v2.4 martin$ rvm list rubies

    rvm rubies

    => ruby-1.8.7-head [ x86_64 ] ruby-1.8.7-p302 [ x86_64 ]

    polaris:v2.4 martin$ rvm gemset create test_rails
    'test_rails' gemset created (/Users/martin/.rvm/gems/ruby-1.8.7-head@test_rails). polaris:v2.4 martin$ rvm use ruby-1.8.7-head@test_rails
    Using /Users/martin/.rvm/gems/ruby-1.8.7-head with gemset test_rails
    polaris:v2.4 martin$ gem environment
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0] - INSTALLATION DIRECTORY: /Users/martin/.rvm/gems/ruby-1.8.7-head@test_rails - RUBY EXECUTABLE: /Users/martin/.rvm/rubies/ruby-1.8.7-head/bin/ruby - EXECUTABLE DIRECTORY: /Users/martin/.rvm/gems/ruby-1.8.7-head@test_rails/bin - RUBYGEMS PLATFORMS:

    - ruby
    - x86-darwin-10


    bundler (1.0.2)
    rake (0.8.7)
    polaris:v2.4 martin$ gem install rails
    Successfully installed activesupport-3.0.0
    Successfully installed builder-2.1.2
    Successfully installed i18n-0.4.1
    Successfully installed activemodel-3.0.0
    Successfully installed rack-1.2.1
    Successfully installed rack-test-0.5.6
    Successfully installed rack-mount-0.6.13
    Successfully installed tzinfo-0.3.23
    Successfully installed abstract-1.0.0
    Successfully installed erubis-2.6.6
    Successfully installed actionpack-3.0.0
    Successfully installed arel-1.0.1
    Successfully installed activerecord-3.0.0
    Successfully installed activeresource-3.0.0
    Successfully installed mime-types-1.16
    Successfully installed polyglot-0.3.1
    Successfully installed treetop-1.4.8
    Successfully installed mail-2.2.7
    Successfully installed actionmailer-3.0.0
    Successfully installed thor-0.14.3
    Successfully installed railties-3.0.0
    Successfully installed rails-3.0.0
    22 gems installed
    Installing ri documentation for activesupport-3.0.0...
    Installing ri documentation for builder-2.1.2...
    ERROR: While generating documentation for builder-2.1.2
    ... MESSAGE: Unhandled special: Special: type=17, text="<!-- HI -->" ... RDOC args: --ri --op /Users/martin/.rvm/gems/ruby-1.8.7-head@test_rails/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation (continuing with the rest of the installation) Installing ri documentation for i18n-0.4.1...
    Installing ri documentation for activemodel-3.0.0...
    Installing ri documentation for rack-1.2.1...
    Installing ri documentation for rack-test-0.5.6...
    Installing ri documentation for rack-mount-0.6.13...
    Installing ri documentation for tzinfo-0.3.23...
    Installing ri documentation for abstract-1.0.0...
    Installing ri documentation for erubis-2.6.6...
    Installing ri documentation for actionpack-3.0.0...
    Installing ri documentation for arel-1.0.1...
    Installing ri documentation for activerecord-3.0.0...
    Installing ri documentation for activeresource-3.0.0...
    Installing ri documentation for mime-types-1.16...
    Installing ri documentation for polyglot-0.3.1...
    Installing ri documentation for treetop-1.4.8...
    Installing ri documentation for mail-2.2.7...
    Installing ri documentation for actionmailer-3.0.0...
    Installing ri documentation for thor-0.14.3...
    Installing ri documentation for railties-3.0.0...
    Installing ri documentation for rails-3.0.0...
    File not found: lib

    Try to create the rdoc manually:

    polaris:v2.4 martin$ gem rdoc rails
    Installing ri documentation for rails-3.0.0...
    File not found: lib

  • Aditya Sanghi

    Aditya Sanghi October 12th, 2010 @ 09:49 AM

    • State changed from “new” to “invalid”
    • Assigned user cleared.

    Ah, i think your RVM installation is broken. I get "rdoc (2.5.8)" just after creating a rvm gemset, but you have bundler and rake only. Surprisingly i dont have bundler by default.

    Marking this ticket as invalid as I believe it might be an environment issue in your local system if not most probably a RVM issue. Feel free to confirm if this is indeed the case.

  • MartinH

    MartinH October 12th, 2010 @ 12:22 PM

    Aditya, I don't agree. The two gems you see are in my @global gemset.
    I've run another test; added rdoc (2.5.11) to @global, created another gemset called @testing3 and installed the rails 3.0.0 to that.
    Total success this time - but the implication is that, apart from ruby and rubygems, rdoc is a requirement before you try to install rails.
    I don't remember seeing this anywhere!
    Hope this helps.

  • Aditya Sanghi

    Aditya Sanghi October 12th, 2010 @ 12:29 PM


    RDOC is not an explicit dependency for Rails. It is an implicit dependency for rubygems if you want to generate RDocs for installed gems which rubygems does by default. If you want to switch off automatic generation of documentation, you need to provide the --no-ri --no-rdoc flags when installing any gem.

    Alternatively you can also use a .gemrc file in your home directory and put

      gem: --no-ri --no-rdoc

    in it to switch off generation of documentation.

    This is not a rails bug, it is default functionality of rubygems gem and the "gem" command.

  • MartinH

    MartinH October 12th, 2010 @ 12:47 PM

    Sorry to persistent but I think this is important.
    I can see what you are saying - it is not an explicit dependency for Rails, except that if Rdoc is not there, the installer will see an error.
    The page states that ruby is required, so is rubygem and then you can install rails using gem install rails.
    If the user (maybe someone completely new to the environment) does not have RDoc installed already, then the first taste they have of rails is an incomplete installation of the documentation and an error message complaining of a missing lib file.
    I have been using Rails for years now, and I was unaware of this. The above came about because I was having to recreate the gem environment as a result of using rvm as I suspect an increasing number of people will do now due of the move to Rails 3.
    So, while it is not a Rails bug, per se, the result of ignoring it is to make Rails look less impressive to some people than would otherwise be the case.
    Clearly this is up to you, but I would think a minor edit of the download instructions may be of some benefit.

  • Aditya Sanghi

    Aditya Sanghi October 12th, 2010 @ 01:25 PM

    • Assigned user set to “Xavier Noria”

    No worries about being persistent, sometime we all miss things too.

    I believe rvm installs a few gems by default (rake and rdoc) which can be controlled and altered by the user explicitly. So as far as rvm use is concerned, people are covered for the default case unless there is a bug in rvm.

    Ruby Enterprise Edition, too installs rdoc, so that too is covered.

    But i just dived into Rubygems source to discover that ruby comes with a default rdoc, so in fact even if you dont have the RDOC gem installed, it should ideally fallback on the default rdoc.

      # Load RDoc from a gem if it is available, otherwise from Ruby's stdlib
      def self.load_rdoc
          gem 'rdoc'
        rescue Gem::LoadError
          # use built-in RDoc
          require 'rdoc/rdoc'
          @rdoc_version = if defined? RDoc::VERSION then
                   '1.0.1' # HACK parsing is hard
        rescue LoadError => e
          raise Gem::DocumentError,
              "ERROR: RDoc documentation generator not installed: #{e}"

    I suspect that it could be a bug in rubygems itself if it cannot properly default to ruby's builtin stdlib rdoc.

    The documentation also does not explicitly state the presence of rake but i'm not sure how far you'll be able to go without it.

    I think your point of having more documentation on the website might be valid, but i believe the documentation there provides broad guidelines and not a detailed step by step guide.

    @Xavier, perhaps you can put in your point of view, here?

  • ywenbo

    ywenbo November 19th, 2010 @ 09:06 AM

    today i moved rails from 2.3.9 to 3.0.3, but after running "gem install rails" there occurs the same rdoc error, the results is there is no any rdoc installed for any of gems even though rails has been installed. Then i try to install rdoc manually one by one and found that all except activerecord is ok, and before i use the same version of gem to install rails and everything goes well, i don't why this time activerecord rdoc failed, the error message is listed below by manually installing rdoc:

    C:\Documents and Settings\wumichu>gem rdoc activerecord
    Installing RDoc documentation for activerecord-3.0.3...
    ERROR: While executing gem ... (Errno::EINVAL)

    Invalid argument - classes/<.html

    can someone help me to take a look at it? Thank you in advance.

  • Xavier Noria

    Xavier Noria November 19th, 2010 @ 09:24 AM

    • State changed from “invalid” to “open”

    @ywenbo thanks. What does rdoc --version say?

  • rails

    rails February 20th, 2011 @ 12:00 AM

    • Tag changed from 3.0.0, ruby1.8, rvm to 300, ruby18, rvm

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • rails

    rails February 20th, 2011 @ 12:00 AM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>