tags:

views:

18

answers:

1

Inside of the interactive ruby console if i type ri then i get an undefined method error, do i explicitly have to install documentation somewhere to get this to work?

irb(main):015:0* ri --help
NoMethodError: undefined method `-@' for nil:NilClass
    from (irb):15
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:295
irb(main):016:0> ri Array
NoMethodError: undefined method `ri' for main:Object
    from (irb):16
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:295
+1  A: 

You probably do not want to do that. What you should be doing is exiting to the shell (or preferably, open a new terminal tab or screen session) and running ri separately, which is a program, from there. If you really, really, want to do what you're doing, you can always use backticks to run ri --help, or any other shell command.

irb(main):015:0* `ri --help`

Marc Bollinger
I feel like a complete newb for this question...wow. Good call %x{} works as well. On a related note, how do you make the back quotes on a keyboard? `
ThinkBohemian
backticks for me are the key below escape
rogerdpack