Yardoc - can't view code docs in browser

I’m using yardoc to document my ruby code. I do have all of my
documentation generated and in the doc directory of my project, when I
type “yard server” WEBrick fires up. But when I go to the actual web
page at port 8808 none of my docs are there. It’s just showing an empty
yardoc HTML template. It does say “Documentation for MyProject” however.
What could be happening?

A strange thing is that it worked perfectly fine (a nice documentation
tool, btw) when I did a test run with a very small set of .rb files.
Then I generated the docs for the whole project (took 3 hours) and now
I’m getting nothing.

Update: I’ve figured out I needed to remove the .yardoc directory and
then fire up the server again. At that point yard has to parse the
source again, create another .yardoc directory and then WEBrick will
start running. Now I have some of the documented code showing in the
resulting web page. The problem now is that it is only parsing data in
the lib directory, and not any of the many other directories I have ruby
code.
According to the documentation for yardoc, one has to specify on the
command line all of those directories you want yardoc to look in and
parse, which is in fact what I did when I actually documented
everything. That’s why I do have everything documented. But now whenever
I remove .yardoc and start up the server and the .yardoc directory is
recreated it only shows .rb files from lib. What is that about?

Update: OK, I’ve specified what paths to parse in the .yardopts file
since YARD only shows documentation from the lib directory by default
unless you specify the paths you want.

Now the page is showing Internal Server Error and I’m getting this
from WEBrick:

ERROR NoMethodError: undefined method root?' for nil:NilClass ~/.gem/ruby/1.8/gems/yard-0.6.3/lib/yard/code_objects/base.rb:391:inpath’

On Dec 8, 2010, at 12:29 , Jeff W. wrote:

Update: OK, I’ve specified what paths to parse in the .yardopts file
since YARD only shows documentation from the lib directory by default
unless you specify the paths you want.

Now the page is showing Internal Server Error and I’m getting this
from WEBrick:

ERROR NoMethodError: undefined method root?' for nil:NilClass ~/.gem/ruby/1.8/gems/yard-0.6.3/lib/yard/code_objects/base.rb:391:inpath’

This looks like a bug to me. You’d be better off (and contribute more
back) if you filed a ticket on their bug tracker.

SOLUTION: I installed the bluecloth and rack gems. Also, the issue may
have been related to how the project handled gems. So I started
controlling the gems through Bundler (http://gembundler.com). Doing all
of this resolved the issue.