Nothing known about… when trying ri String#upcase Ruby

后端 未结 3 1603
孤独总比滥情好
孤独总比滥情好 2020-12-02 23: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

相关标签:
3条回答
  • 2020-12-02 23:14

    It might be that docs aren't working because you're using the latest ruby version, 2.1, in which rvm has some problems. It doesn't generate docs, thus you can't retrieve the docs with ri.

    **Error: **

    Your ruby version 2.1.2 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0

    0 讨论(0)
  • 2020-12-02 23:22

    Did you generate the docs?

    rvm docs generate

    https://rvm.io/rubies/docs/

    0 讨论(0)
  • 2020-12-02 23:32

    RDoc is installed, I'm not sure why that particular lookup does not work. Perhaps somebody else can shed some light on that.

    However, if you just need to find out about how to use particular parts of the API, you can't go wrong with a google search. All of the Rdoc documentation is available online from numerous locations.

    Here's String#upcase for example: http://ruby-doc.org/core/classes/String.html#M001155

    0 讨论(0)
提交回复
热议问题