How do I generate RDOC for (all of) Rails?
The easiest I found was to just download them from railsapi.com and unpack the file into /Library/Ruby/Gems/1.8/doc/rails-2.3.3/rdoc/
creating Rdoc for a rails app
I added this to my Rakefile;
RDoc::Task.new :rdoc do |rdoc|
rdoc.main = "README.rdoc"
rdoc.rdoc_files.include("README.rdoc", "doc/*.rdoc", "app/**/*.rb", "lib/*.rb", "config/**/*.rb")
#change above to fit needs
rdoc.title = "App Documentation"
rdoc.options << "--all"
end
Then run;
rake rdoc
Check out the RDoc::Task docs for more http://rdoc.rubyforge.org/RDoc/Task.html
Admittedly I am on a rails 3 app, but I think this works the same.
How to rebuild rdoc for all the installed gems?
yard gems
or
sudo yard gems
should do the job. You may also want to use the --rebuild flag. If you want to run a local Yardoc server for your installed gems, then run
yard server -g
Get and install a new RDoc template
The one used at http://api.rubyonrails.org is the "Horo" template. You can find it here, along with instructions for using it (it's installed via a gem):
https://github.com/tenderlove/horo
How can I install ri and rdoc files for gems afterwards?
# See the relevant help.
gem help rdoc
# Generate rdoc and ri for the "foo" gem.
gem rdoc --ri foo
# Generate rdoc for all installed gems.
gem rdoc --all
Related Topics
How to Call an Older Version of a Gem from the Commandline
What Is the Correct Way to Detect If Ruby Is Running on Windows
Making Multiple Http Requests Asynchronously
Difference Between 'Self.Method_Name' and 'Class << Self' in Ruby
Accessing Objects Memory Address in Ruby
Silencing Deprecation Warnings in Rails 3
Devise Custom Messages When Validation Fails
How to Post Xml to Restful Web Service Using Net::Http::Post
How to Measure the Size of a Ruby Object
Ruby Dropped in Netbeans 7,How to Use It in Netbeans7
Getting the Highest Value of a Column in Mongodb
Logging All Method Calls in a Rails App
Run Ruby Script in Elevated Mode
Rails 3. How to Add a Helper That Activeadmin Will Use