Gem rdoc rails does not generate documentation


#1

gem rdoc rails

That should generate documentation for rails but it doesn’t. It works
for all other gems. It creates a directory
/usr/lib/ruby/gems/1.8/doc/rails-1.2.3/ which contains nothing. Rails
exists and works fine, I just can’t create the docs (note that I can
create the docs for various components of rails - action* and active* -
but not the “root” docs).

Does anyone know anything about this problem?

Thanks.


#2

You can always generate an application and then from the application
root run:

rake rails:doc

That drops a copy of the API docs in the doc/ folder.

–Jeremy

On 7/3/07, Stephan D. removed_email_address@domain.invalid wrote:

Does anyone know anything about this problem?

Thanks.


Posted via http://www.ruby-forum.com/.


http://www.jeremymcanally.com/

My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/


#3

Thanks. I have done that in the past but I’d like to manage my
documentation using a single mechanism (i.e. gem) and have all docs
indexed from the same place (i.e. using gem_server at
http://localhost:8808/).

It shows the docs for every gem but rails.


#4

You can always generate an application and then from the application root run:
rake rails:doc

This doesn’t work on my system (Mac, Ruby 1.8.6, Rails 1.2.3). I get
the following response:
(~/Rails/project)
rake aborted!
Don’t know how to build task ‘rails:doc’

I’m totally frustrated with RDoc. Can’t find ANY of the documentation
it throws on the hard drive during gem and MacPorts installs.
—Jim Gagne—


#5

On my system it’s rake doc:rails.

You can see a list of available tasks with rake -T.


#6

As for finding the documentation, you should be able to run gem_server
then visit http://localhost:8808/ for an index of the gem documentation
available.

My ruby installation lives in /usr/lib/ruby and the documentation is in
various subdirectories.

steph@localhost ~ $ cd /usr/lib/ruby
steph@localhost /usr/lib/ruby $ find . -name “doc”
./1.8/doc
./gems/1.8/doc
./gems/1.8/doc/rake-0.7.3/rdoc/files/doc
./gems/1.8/doc/rubygems-0.9.4/rdoc/files/doc
./gems/1.8/gems/rails-1.2.3/doc
./gems/1.8/gems/rake-0.7.3/doc
./gems/1.8/gems/vim-ruby-2006.07.11/doc


#7

These are exactly the steps I am having problems with on a Windows
install. As per my post a couple below this one.

Anyone have any ideas that might help, please?

rails sample_project
cd sample_project
rake rails:freeze:gems
rake doc:rails
rake rails:unfreeze


#8

:smiley: Ok. Looks like my thread’s in danger of turning in to a general
rails documentation topic. I’ll reply to this question on your other
thread at http://www.ruby-forum.com/topic/114553

To return to my original question, does anyone know how to generate the
rails documentation with gem?


#9

Freeze your rails gem, then generate the document. Like this:

rails sample_project
cd sample_project
rake rails:freeze:gems
rake doc:rails
rake rails:unfreeze

I wrote it up here:
http://www.nullislove.com/2007/05/29/rails-documentation/

And that post includes how to generate rdocs for Ruby too.

HTH,
Kevin S.


#10

I was having a lot of trouble getting gem to work properly. See
details at
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/78421630796c7751/a4f0f59e9eb3b559#a4f0f59e9eb3b559

I solved it by uninstalling and reinstalling gem. Now gem_server and
rake:freeze:gems work fine.