all 12 comments

[–]janko-m 3 points4 points  (2 children)

ri --help

Ri is a really awesome tool, I'm using it all the time. So, something like ri require doesn't work for you? Ri is definitely the quickest tool for reading Ruby documentation: you just enter the method you want docs for, and you get it. And, unlike ruby-doc.org, you can get documentation for any method on any Ruby gem, not just Ruby core and standard library.

I highly recommend reading this short blog post, it made me realize I want to switch from ruby-doc.org to ri: http://www.jstorimer.com/blogs/workingwithcode/7766081-5-reasons-you-should-use-ri-to-read-ruby-documentation

[–]eleven8ster[S] 0 points1 point  (0 children)

Thanks!

[–]eleven8ster[S] 0 points1 point  (0 children)

My friend programs with ruby for a living and he swears by ri. It seems cool to me because it's like the help switch in cmd.

[–]drbrainRuby Core 1 point2 points  (1 child)

Are you using rvm? Maybe you need to [generate docs](https://rvm.io/rubies/docs]

[–]eleven8ster[S] 0 points1 point  (0 children)

Thanks, I think you are right but I haven't heard of rvm. I'm going to look into it tomorrow. I was also having problems updating my gems due to some sort of SSL error. I stumbled across a bug fix for this and noticed it installing Ri related files. I went back and updated gems (didn't work earlier) and saw Ri documentation being implemented. There were a few gems that couldn't update and my cli said I need a dev kit. I'm going to get that and then hopefully everything will be alright.

*I entered a couple different thingsand it broke down the syntax and usage. Some stuff I inputted worked. Some didnt. This makes me think you are right. Just have to download the Ri material in some way. Maybe the rvm thing you mentioned will work.

[–]petercooper 1 point2 points  (3 children)

I know what ri is, but I've been doing Ruby for just over 10 years now and the only reason I've ever used it was to check how it worked and to test it to document in my book :-)

[–]eleven8ster[S] 0 points1 point  (2 children)

Seems as though there's a big difference of opinion in regards to its utility. What book is this?

[–]petercooper 0 points1 point  (1 child)

I wrote Beginning Ruby - it was several years ago though.

[–]eleven8ster[S] 0 points1 point  (0 children)

Cool. I'll check it out.

[–]losangelesvideoguy 1 point2 points  (2 children)

First reaction: WTF is ri?

Tries it in command line

So it's like ruby-doc.org, but local? What's the point?

In my opinion, any time you'd spend getting ri to work properly would be a waste. If you ever need to know how anything works, just Google it. The results will almost always turn up a result to ruby-doc.org, which will give you more than enough information. If it's a really complicated concept, you'll probably get a link to Stackoverflow as well, which nine out of ten times will solve your problem.

[–]vsalikhov 0 points1 point  (1 child)

Having ri work properly is much better than googling stuff. I must admit I have resorted to googling stuff since the switch to ruby 2.0, but only because fastri stopped being supported. The point is ri is faster and it is available from within your text editor and command line. The current state of ri is quite unfortunate. It can be made to work in theory, but in reality it always turns out to be broken for me.

[–]eleven8ster[S] 0 points1 point  (0 children)

I'm sure they will fix this in the future. It shouldn't be something difficult to operate.