Forum: Ruby on Rails rails-1.0.0 gem rdoc problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jim F. (Guest)
on 2006-02-02 02:30
(Received via mailing list)
Just got a brand new install of ruby-1.8.4 and new gems downloaded,
specifically rails-1.0.0. Seems rails does not generated rdoc for
gem_server.
Looking into the problem, it seems that there is an error when doing
'rake rdoc'
for rails-1.0.0.

% rake rdoc
(in /opt/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.0.0)
rm -r doc

unrecognized option `--line-numbers --inline-source --accessor
cattr_accessor=object'

For help on options, try 'rdoc --help'

rake aborted!
exit

(See full trace by running task with --trace)

This can be fixed with the following change:

--- Rakefile    2006-02-01 18:24:07.000000000 -0600
+++ Rakefile.bak        2006-02-01 18:25:38.000000000 -0600
@@ -233,7 +233,7 @@
 Rake::RDocTask.new { |rdoc|
   rdoc.rdoc_dir = 'doc'
   rdoc.title    = "Railties :: Gluing the Engine to the Rails"
-  rdoc.options << '--line-numbers --inline-source --accessor
cattr_accessor=object'
+  rdoc.options += %w(--line-numbers --inline-source --accessor
cattr_accessor=object)

   rdoc.template = "#{ENV['template']}.rb" if ENV['template']
   rdoc.rdoc_files.include('README', 'CHANGELOG')


This fixes the doc generation problem, but I still had to manually copy
the doc directory to the gems doc directory. Any reason why I had to
do this?


Thanks

--
Jim F.
Scott W. (Guest)
on 2006-02-04 02:04
Jim,

I'm using a fresh install of Ubuntu Breezy from a live CD but I'm seeing
the same behaviour on my Ubuntu Breezy harddrive install too.

I get the exact error you describe when I try to run:

rake appdoc

when I'm in the directory of my Rails project.

On my "single click install" Locomotive over on OS X it builds the rdocs
just fine using the exact same versions of rake 0.7.0 and rails 1.0.0.

I implemented your fix above - but no change.  Am I changing the wrong
Rakefile?

Where are you running your commands from?

Thanks,

Scott Weaver



Your fix didn't work for me.  Am I changing the wrong Rakefile?  I'm on
Ubuntu with a fresh install of Breezy.

When I "gem environment gemdir" I get the directory

/usr/lib/ruby/gems/1.8

so I've been trying to change the Rakefile at

/usr/lib/ruby/gems/1.8/gems/rails-1.0.0

error message persists unchanged.

Can you help?

Thanks,

Scott Weaver
Jim F. (Guest)
on 2006-02-04 08:41
(Received via mailing list)
Hi Scott

On Feb 3, 2006, at 6:04 PM, Scott Weaver wrote:

> I implemented your fix above - but no change.  Am I changing the wrong
> Rakefile?
>
> Where are you running your commands from?

The file I edited was:

   /opt/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.0.0

But, I didn't run 'rake appdoc', I ran 'rake rdoc'. The line I
changed was approx line 236:

    236   rdoc.options += %w(--line-numbers --inline-source --
accessor cattr_accessor=object)

Does that help? If not, what is the error. You may want to try:

   rake rdoc --trace

or

   rake rdoc --verbose

> so I've been trying to change the Rakefile at
>
> /usr/lib/ruby/gems/1.8/gems/rails-1.0.0
>
That looks right.

> error message persists unchanged.
>
Puzzling, indeed.

--
Jim F.
Scott W. (Guest)
on 2006-02-04 22:58
Hi Jim,

Thanks for the help.  Your original suggestion was quite clear - but
didn't work in my case.  I finally solved my problem by looking in my
"Programming Ruby" book and issuing the following two statements:

sudo gem uninstall rake

(it asked me if I wanted to ignore dependencies, Rail 1.0 requires at
least rake 0.6.2 - I said yes delete it all)

sudo gem install rake -v 0.6.2 rake

(this was sucessful too)

So now, when I'm in my rails project folder and perform

rake appdoc

It builds my html documentation in the doc/ directory.

Now I can investigate my scaffolding extension plugin...

Scott
Jim F. (Guest)
on 2006-02-05 05:00
(Received via mailing list)
On Feb 4, 2006, at 2:58 PM, Scott Weaver wrote:

> Hi Jim,
>
> Thanks for the help.  Your original suggestion was quite clear - but
> didn't work in my case.  I finally solved my problem by looking in my
> "Programming Ruby" book and issuing the following two statements:
>
> rake appdoc
>
> It builds my html documentation in the doc/ directory.
>

Glad you got it working. I've had strange problems like this in with
other
gems. I think there is an obscure gems bug when older revisions are
around.


Jim F.
This topic is locked and can not be replied to.