可能重复:
Nothing known about… when trying ri String#upcase Ruby
版本信息如下所示:
Hanfeis-MacBook-Pro-2:ruby ad9075$ rvm -v
rvm 1.17.0 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Hanfeis-MacBook-Pro-2:ruby ad9075$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]
Hanfeis-MacBook-Pro-2:ruby ad9075$ ri -v
ri 3.12
Hanfeis-MacBook-Pro-2:ruby ad9075$ ri Math
Nothing known about Math
我尝试gem rdoc --all
,它提供了一些NOTE
,执行此命令后,ri仍无法找到这些库。
Hanfeis-MacBook-Pro-2:7w7l ad9075$ gem rdoc --all
NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /Users/ad9075/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/commands/rdoc_command.rb:58.
NOTE: Gem::SourceIndex.installed_spec_directories is deprecated, use Specification.dirs. It will be removed on or after 2011-11-01.
Gem::SourceIndex.installed_spec_directories called from /Users/ad9075/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:47.
NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem :: SourceIndex.from_gems_in来自/Users/ad9075/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:47.
当我尝试ri Integer
时,它不会返回内置Integer
的文档,而是返回结果lke this:
= Integer < Object
(from gem activesupport-3.2.9)
------------------------------------------------------------------------------
------------------------------------------------------------------------------
= Instance methods:
month, months, multiple_of?, ordinalize, year, years
我认为问题可能是在我使用rvm切换到新版本的ruby之后。 ri 配置不好,无法找到内置函数和类的路径。有没有人有想法如何解决这个问题?