views:

398

answers:

2

I'm running a few rails/rake apps in Apache/passenger and I want to add the documentation app served by gem server to these apps, so I can easily give it a special (sub)domain, like docs.example.org, so it's easily available for all members of our team and nobody has to start the server himself or remember port numbers (like 8808, the default gem server port).

A: 

I would recommend looking into bdoc instead of gem server, it allows the user to access all their gem docs without a server running at all. It would also be trivial to modify bdoc to output to a specific directory then you could easily add a step to regenerate the docs.

The nice thing about having them in static files would be the apache config is dead simple.

If you do want to make bdoc output to a specific dir look at this line.

Edit:

I actually went ahead and branched this on github and made the change. Now you can supply the output directory on the command line and it will generate the static rdoc pages for you.

csexton
A: 

I'm running http://gems.local on my machine in case I want to do some Ruby cracking offline. (Plain journey, trains, etc).

This is really easy, you can actually run passenger with all the Ruby gems' documentation locally without having to access the net.

I was following Jason's tips and got everything working. See the following article and you should be ready to go:

http://jasonseifer.com/2009/02/22/offline-gem-server-rdocs

Attila

Attila Györffy