rdoc

undefined method `reset' for RDoc::TopLevel:Class when installing a new Ruby gem

南笙酒味 提交于 2021-02-06 10:44:14
问题 For example, $ gem install netaddr Fetching: netaddr-1.5.1.gem (100%) Successfully installed netaddr-1.5.1 ERROR: While executing gem ... (NoMethodError) undefined method `reset' for RDoc::TopLevel:Class The NoMethodError exception keeps being raised when I install any new gem. I googled about it and searched issues in RDoc and RubyGems GitHub repositories, but had no luck. My Ruby version is $ ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] The RubyGems version is $ gem -v

Nothing known about… when trying ri String#upcase Ruby

落花浮王杯 提交于 2019-12-28 03:46:07
问题 I have just installed the RVM and I am reading The Well-Grounded Rubyist book. In the first chapter I am supposed to try ri String#upcase to view documentation on the upcase method, however I get a message saying: Nothing known about String#upcase I found some posts here on SO telling me that it probably is because RDoc is not installed. However I do not understand how to fix it. I am using Mac OSX 10.6, and latest RVM. I have only installed 1.9.2, in addition to the standard Ruby interpreter

Displaying inherited methods in rdoc

戏子无情 提交于 2019-12-22 11:01:12
问题 I have a program written in Ruby that uses multiple levels of inheritance. All of the parent classes have implemented methods that an object of a child class would use, but when I generate an rdoc for my program, the rdoc page for a child class only shows the methods for that specific class and no methods from the parent class. Does anyone know how to display inherited class methods in rdoc? I have looked through rdoc documentation and some websites and haven't been able to find an answer on

creating Rdoc for a rails app

帅比萌擦擦* 提交于 2019-12-21 04:17:20
问题 I would like to generate a documentation to my rails (2.3.8) project. When I tried rake doc:rails rake doc:rerails It creates documentation for all the classes including standard ruby classes and all the ruby files in vendor directory (plugins etc..) How can I create rdoc documentation only for ruby classes, files in following directories app folder (all the models, controllers and views) config folder lib folder 回答1: I added this to my Rakefile; RDoc::Task.new :rdoc do |rdoc| rdoc.main =

Can you install documentation for existing gems?

杀马特。学长 韩版系。学妹 提交于 2019-12-18 03:23:13
问题 Rubyinside mentioned a blog post on how to speed up gem installation by not installing RI or RDoc. Is it possible to install a gem and subsequently install documentation at a later date, so you can hack in haste and RTFM at leisure? 回答1: > gem help rdoc Usage: gem rdoc [args] [options] Options: --all Generate RDoc/RI documentation for all installed gems --[no-]rdoc Include RDoc generated documents --[no-]ri Include RI generated documents -v, --version VERSION Specify version of gem to rdoc

Change a RDoc template for generating Rails app documentation

南笙酒味 提交于 2019-12-13 18:21:34
问题 I have just added some documentation to my Rails 3.2.13 app. I can generate the documentation just fine (running RDoc 3.12.2) by using a rake task: # lib/tasks/documentation.rake Rake::Task["doc:app"].clear Rake::Task["doc/app"].clear Rake::Task["doc/app/index.html"].clear namespace :doc do RDoc::Task.new('app') do |rdoc| rdoc.rdoc_dir = 'doc/app' rdoc.generator = 'hanna' rdoc.title = 'Stoffi Web App Documentation' rdoc.main = 'doc/Overview' rdoc.options << '--charset' << 'utf-8' rdoc.rdoc

Documenting constants and methods

孤街醉人 提交于 2019-12-13 03:54:50
问题 I am writing a documentation for my Ruby on Rails 3.0.7 application using RDoc. In the application lib folder, I have the following: module ModuleName class ModuleName::User < ActiveRecord::Base #'CONSTANT' documentation text CONSTANT = 'Test constant' #'method_name' documentation text def method_name ... end end end When I try to generate the documentation for the code above, RDoc will not parse the #'CONSTANT' documentation text and the #'method_name' documentation text , so the ouput

Generating RDOCs for locally installed gems

旧巷老猫 提交于 2019-12-12 18:09:21
问题 I am trying to contribute to a gem I recently took interest in - Nesta. The developer has done a great job in creating one of the lightest, thinest CMSs you can find and I want to document it. I have read through the code and commented on a few methods to the best of my knowledge. However, I seek to test this out locally by calling gem server and seeing the changes on my machine before pushing it online. Things I have tried: Manual edit. Documented the file. Fired up gem server . Using the

How make contents of README_FOR_APP appear in doc/app/index.html

自古美人都是妖i 提交于 2019-12-12 13:03:45
问题 I'd like the contents of doc/README_FOR_APP appear in doc/app/index.html , when I do rake doc:app . Currently, the content is: This is the API documentation for Rails Application Documentation. To see README_FOR_APP , I have to click on README_FOR_APP in the pages list on the left. I've looked at How to Rename or Move Rails's README_FOR_APP but the OP asserts that he's already seeing the behaviour I want. I'm using rails 3.1.3. 回答1: Firstly, create a new rake file (e.g lib/tasks/documentation

Rake aborted! Don't know how to build task 'doc:app'

谁说胖子不能爱 提交于 2019-12-10 19:35:39
问题 The official documentation indicates that I should be able to build documentation for my application using rake doc:app , but when I run the command in Rails 5 I get the following output: bwerth@bwerth-VirtualBox:~/rails/gep$ rake doc:app rake aborted! Don't know how to build task 'doc:app' (see --tasks) (See full trace by running task with --trace) 回答1: This functionality was removed from Rails in version 5 with the following justification: ...In our experience applications do not generate