mislav / hanna

More than just a new RDoc template
MIT License
234 stars 40 forks source link

hanna --gems fails with 1.9.2 #24

Open Quintus opened 13 years ago

Quintus commented 13 years ago

The command to generate gem docs for all installed gems, hanna --gems, fails on 1.9.2 since hanna tries to document rdoc, rake and minitest, which don't behave as normal gems. Example session on a freshly compiled Ruby (no gems installed):

    marvin@ikarus:~$ sudo gem install --no-rdoc hanna
    Successfully installed rdoc-2.3.0
    Successfully installed haml-2.2.24
    Successfully installed hanna-0.1.12
    3 gems installed
    Installing ri documentation for rdoc-2.3.0...
    Installing ri documentation for haml-2.2.24...
    Installing ri documentation for hanna-0.1.12...
    marvin@ikarus:~$ sudo hanna --gems
    Hanna is installing documentation for 5 gems ...
    Installing RDoc documentation for hanna-0.1.12...
    Installing RDoc documentation for haml-2.2.24...
    Could not find main page README.rdoc
    Installing RDoc documentation for minitest-1.6.0...
    /opt/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/doc_manager.rb:182:in `chdir': No such file or directory - /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/minitest-1.6.0 (Errno::ENOENT)
    from /opt/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/doc_manager.rb:182:in `run_rdoc'
    from /opt/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/doc_manager.rb:144:in `install_rdoc'
    from /opt/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/doc_manager.rb:130:in `generate_rdoc'
    from /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/hanna-0.1.12/bin/hanna:74:in `block in <top (required)>'
    from /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/hanna-0.1.12/bin/hanna:73:in `each'
    from /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/hanna-0.1.12/bin/hanna:73:in `<top (required)>'
    from /opt/rubies/ruby-1.9.2-p0/bin/hanna:19:in `load'
    from /opt/rubies/ruby-1.9.2-p0/bin/hanna:19:in `<main>'
    marvin@ikarus:~$ gem list

    *** LOCAL GEMS ***

    haml (2.2.24)
    hanna (0.1.12)
    minitest (1.6.0)
    rake (0.8.7)
    rdoc (2.5.8, 2.3.0)
    marvin@ikarus:~$ 

ruby -v: ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

Marvin

mislav commented 13 years ago

Hmm I didn't know that. How are these "system" gems different?

Thanks for reporting this

Quintus commented 13 years ago

They don't reside in the gems/ directory, but rather directly in the stdlib. Again, on a freshly compiled Ruby:

marvin@ikarus:~$ gem list

*** LOCAL GEMS ***

minitest (1.6.0)
rake (0.8.7)
rdoc (2.5.8)
marvin@ikarus:~$ ls -a /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems
.  ..
marvin@ikarus:~$ gem which rake
/opt/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb
marvin@ikarus:~$ 

Marvin

raggi commented 13 years ago

i think this works with my fork, if not, please let me know.

Quintus commented 13 years ago

Hm, I just downloaded it from your master repo, but it doesn't work:

marvin@kerberos:~$ sudo gem list --local

*** LOCAL GEMS ***

chingu (0.7.7.5)
coderay (0.9.3)
cri (1.0.1)
gosu (0.7.23)
haml (3.0.17, 2.2.24)
hanna (0.1.13)
minitest (1.7.0, 1.6.0)
nanoc (3.1.5)
nanoc3 (3.1.5)
nokogiri (1.4.3.1)
r18n-core (0.4.7.1)
r18n-desktop (0.4.7.1)
rake (0.8.7)
rdoc (2.5.11, 2.5.8, 2.3.0)
RedCloth (4.2.3)
rmagick (2.13.1)
rubyzip (0.9.4)
term-ansicolor (1.0.5)
test-unit (2.1.1)
tk_as_gem (0.1.0)
wxruby-ruby19 (2.0.1 x86_64-linux)
marvin@kerberos:~$ sudo gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /opt/rubies/ruby-1.9.2-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /opt/rubies/ruby-1.9.2-p0/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1
     - /home/marvin/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--no-rdoc --format-executable"
     - "update" => "--no-rdoc --format-executable"
     - "rdoc" => "-f hanna"
  - REMOTE SOURCES:
     - http://rubygems.org/
marvin@kerberos:~$ sudo gem rdoc --no-ri --all --overwrite
Installing RDoc documentation for RedCloth-4.2.3...
Installing RDoc documentation for chingu-0.7.7.5...
Installing RDoc documentation for coderay-0.9.3...
Installing RDoc documentation for cri-1.0.1...
Installing RDoc documentation for gosu-0.7.23...
Installing RDoc documentation for haml-2.2.24...
Installing RDoc documentation for haml-3.0.17...
Installing RDoc documentation for hanna-0.1.13...
Installing RDoc documentation for minitest-1.6.0...
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/minitest-1.6.0
marvin@kerberos:~$ 

I previously uninstalled the old hanna gem to avoid possible conflicts.

Marvin