# Rails-1.0.0 gem rdoc problem

**URL:** <https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152>\
**Category:** Rails\
**Created:** [February 2, 2006, 1:30am UTC](https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152 "2006-02-02T01:30:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 2, 2006, 1:30am UTC](https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152/1 "2006-02-02T01:30:35Z")

</div>

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)

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.

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 4, 2006, 1:04am UTC](https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152/2 "2006-02-04T01:04:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 4, 2006, 7:41am UTC](https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152/3 "2006-02-04T07:41:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 4, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152/4 "2006-02-04T21:58:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sauy7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Post date:** [February 5, 2006, 4:00am UTC](https://www.ruby-forum.com/t/rails-1-0-0-gem-rdoc-problem/100152/5 "2006-02-05T04:00:43Z")

</div>

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.
