RDoc/Ruby1.9 problems

J

Jim Menard

I had previously installed RDoc. I checked out the latest Ruby via CVS,
then typed

% ./configure --enable-install-doc
% make
% make install

At the end of the compilation process, I saw

Generating RDoc documentation
/usr/local/bin/ruby ./bin/rdoc --all --ri-system .
./bin/rdoc:59:in `require': No such file to load -- rdoc/rdoc (LoadError)
from ./bin/rdoc:59
make: *** [install-doc] Error 1

Following a suggestion by Gavin Sinclair on the ruby-doc email list, I
tried un-installing the existing RDoc installation and redoing everything.
That didn't fix the problem; I still see the same error.

I don't think that RDoc is getting installed by the CVS version of Ruby,
but it tries to *use* rdoc.

Any suggestions?

Thanks for your help.

Jim
 
T

ts

J> I don't think that RDoc is getting installed by the CVS version of Ruby,
J> but it tries to *use* rdoc.

Look if it install rdoc, with

svg% ./ruby -v
ruby 1.9.0 (2004-01-11) [i686-linux]
svg%

svg% make install
[...]
install -c -p -m 0644 lib/rdoc/options.rb /home/ts/local/r190/lib/ruby/1.9/rdoc
install -c -p -m 0644 lib/rdoc/rdoc.rb /home/ts/local/r190/lib/ruby/1.9/rdoc
install -c -p -m 0644 lib/rdoc/template.rb /home/ts/local/r190/lib/ruby/1.9/rdoc
[...]
svg%


Guy Decoux
 
D

Dave Thomas

Following a suggestion by Gavin Sinclair on the ruby-doc email list, I
tried un-installing the existing RDoc installation and redoing
everything.
That didn't fix the problem; I still see the same error.


Jim:

The folks at ruby-doc have nothing to do with ri and rdoc (apart from
using it). Feel free to drop me e-mail and I'll do my best to help.

In this case, the "--enable-install-doc" option is not current. In the
latest CVS, the installation is enabled by default (there was much
discussion on ruby-code about this. At some point matz decided and the
patch went in) Could you check your Makefile. You should find lines
that look something like:

install: install-nodoc install-doc

install-nodoc: rbconfig.rb
$(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS)
--mantype="$(MANTYPE)"
$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) install

what-where no-install: rbconfig.rb
$(MINIRUBY) $(srcdir)/instruby.rb -n $(SCRIPT_ARGS)
--mantype="$(MANTYPE)"
$(MINIRUBY) $(srcdir)/ext/extmk.rb -n $(SCRIPT_ARGS) install

install-doc:
@echo Generating RDoc documentation
$(bindir)/$(PROGRAM) $(srcdir)/bin/rdoc --all --ri-system $(srcdir)




Cheers

Dave
 
J

Jim Menard

ts said:
J> I don't think that RDoc is getting installed by the CVS version of Ruby,
J> but it tries to *use* rdoc.

Look if it install rdoc, with

svg% ./ruby -v
ruby 1.9.0 (2004-01-11) [i686-linux]

Yup, ruby 1.9.0 is installed
svg%

svg% make install
[...]
install -c -p -m 0644 lib/rdoc/options.rb /home/ts/local/r190/lib/ruby/1.9/rdoc
install -c -p -m 0644 lib/rdoc/rdoc.rb /home/ts/local/r190/lib/ruby/1.9/rdoc
install -c -p -m 0644 lib/rdoc/template.rb /home/ts/local/r190/lib/ruby/1.9/rdoc
[...]

Nope. I see

install -c -p -m 0755 bin/rdoc /usr/local/bin/rdoc

but not the lines you posted.

Jim
 
T

ts

J> Nope. I see

J> install -c -p -m 0755 bin/rdoc /usr/local/bin/rdoc

J> but not the lines you posted.

well, my instruby.rb do

for f in Dir["lib/**/*{.rb,help-message}"]
dir = File.dirname(f).sub!(/\Alib/, rubylibdir) || rubylibdir
makedirs dir
install f, dir, :mode => 0644
end



Guy Decoux
 
J

Jim Menard

Dave Thomas said:
Jim:

Did you run 'autoconf'?

I refreshed CVS, ran

./configure
make
sudo make install

The first think that "make" did was run autoconf.

This time, the Makefile reads

install: install-nodoc install-doc

However, it still only installs the rdoc binary but does not install the rdoc
ruby library.

I'm on Mac OS X, if that matters. Thanks for your help.

Jim
 
D

Dave Thomas

However, it still only installs the rdoc binary but does not install
the rdoc
ruby library.

I'm on Mac OS X, if that matters. Thanks for your help.

Me too.

By any chance... when you checked out of CVS, did you forget to use the
'-d' option? Do you actually have the RDoc libraries downloaded to your
box? (After you check out, do an ls lib/rdoc)


Cheers

Dave
 
J

Jim Menard

Dave Thomas said:
By any chance... when you checked out of CVS, did you forget to use the
'-d' option? Do you actually have the RDoc libraries downloaded to your
box? (After you check out, do an ls lib/rdoc)

AAARRRGGGHHH! Rather, ARGV! I always forget "-d". It's time to retrain my
fingers.

That was it. Thank you, Dave.

Jim
 
O

Ollivier Robert

[courtesy cc of this posting sent to cited author via email]

The folks at ruby-doc have nothing to do with ri and rdoc (apart from
using it). Feel free to drop me e-mail and I'll do my best to help.

Trying to run the "rdoc --all -R $PWD" to generate ri data on 1.8.1 leads

to the following:

[...]
bignum.c:
array.c:
Generating RI...
/usr/local/lib/ruby/1.8/rdoc/markup/simple_markup/to_flow.rb:92:in
`accept_rule': undefined local variable or method `size' for #<SM::ToFlow:0x11795720> (NameError)
from/usr/local/lib/ruby/1.8/rdoc/markup/simple_markup/fragments.rb:170:in
`accept'
from/usr/local/lib/ruby/1.8/rdoc/markup/simple_markup/fragments.rb:165:in
`each'
from/usr/local/lib/ruby/1.8/rdoc/markup/simple_markup/fragments.rb:165:in
`accept'
from /usr/local/lib/ruby/1.8/rdoc/markup/simple_markup.rb:259:in
`convert'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:224:in
`markup'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:153:in
`generate_method_info'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:133:in
`generate_class_info'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:132:in
`each'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:132:in
`generate_class_info'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:90:in
`process_class'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:85:in
`generate'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:84:in
`each'
from /usr/local/lib/ruby/1.8/rdoc/generators/ri_generator.rb:84:in
`generate'
from /usr/local/lib/ruby/1.8/rdoc/rdoc.rb:210:in `document'
from /usr/local/bin/rdoc:63

Any idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top