rdoc files: how to read them?

Discussion in 'Ruby' started by RichardOnRails, Mar 15, 2012.

  1. I saw a book on The Pragmatic Boookshelf that I thought I might wand to buy, but I saw no way to see a sample of its content a la Amazon.

    I downloaded its code and saw some .rdoc files. I could view them as text,but that's obviously not the best approach. I saw a recommendation somewhere to view them in a browser. I dragged the filename into the browser, which produced a somewhat better result.

    I believe that the content of http://www.ruby-doc.org/stdlib-1.9.2// is based on generated rdoc's and look great in my browser. What do I have to do to get the same formatting in my browser for the rdoc's I downloaded?

    I'm running Firefox 10.0.2 over WinXP-Pro/SP3.

    Thanks in Advance,
    Richard
    RichardOnRails, Mar 15, 2012
    #1
    1. Advertising

  2. Am 15.03.2012 17:45, schrieb RichardOnRails:
    > I saw a book on The Pragmatic Boookshelf that I thought I might wand
    > to buy, but I saw no way to see a sample of its content a la Amazon.
    >
    > I downloaded its code and saw some .rdoc files. I could view them as
    > text, but that's obviously not the best approach. I saw a
    > recommendation somewhere to view them in a browser. I dragged the
    > filename into the browser, which produced a somewhat better result.
    >
    > I believe that the content of http://www.ruby-doc.org/stdlib-1.9.2//
    > is based on generated rdoc's and look great in my browser. What do I
    > have to do to get the same formatting in my browser for the rdoc's I
    > downloaded?


    I don’t know the exact RDoc template they use at ruby-doc.org (I wish I
    did, it’s great), but you can transform RDoc files into HTML just the
    same way you transform Ruby documentation into HTML.

    $ rdoc file1.rdoc file2.rdoc file3.rdoc ...

    Note that under Ruby < 1.9 you have to install the `rdoc' gem first.

    Vale,
    Marvin
    Marvin Gülker, Mar 15, 2012
    #2
    1. Advertising

  3. On Thursday, March 15, 2012 6:13:12 PM UTC-4, Marvin Gülker wrote:
    > Am 15.03.2012 17:45, schrieb RichardOnRails:
    > > I saw a book on The Pragmatic Boookshelf that I thought I might wand
    > > to buy, but I saw no way to see a sample of its content a la Amazon.
    > >
    > > I downloaded its code and saw some .rdoc files. I could view them as
    > > text, but that's obviously not the best approach. I saw a
    > > recommendation somewhere to view them in a browser. I dragged the
    > > filename into the browser, which produced a somewhat better result.
    > >
    > > I believe that the content of http://www.ruby-doc.org/stdlib-1.9.2//
    > > is based on generated rdoc's and look great in my browser. What do I
    > > have to do to get the same formatting in my browser for the rdoc's I
    > > downloaded?

    >
    > I don’t know the exact RDoc template they use at ruby-doc.org (I wish I
    > did, it’s great), but you can transform RDoc files into HTML just the
    > same way you transform Ruby documentation into HTML.


    Hi Marvin,

    Thanks for your response.
    >
    > $ rdoc file1.rdoc file2.rdoc file3.rdoc ...
    >
    > Note that under Ruby < 1.9 you have to install the `rdoc' gem first.
    >
    > Vale,
    > Marvin




    On Thursday, March 15, 2012 6:13:12 PM UTC-4, Marvin Gülker wrote:
    > Am 15.03.2012 17:45, schrieb RichardOnRails:
    > > I saw a book on The Pragmatic Boookshelf that I thought I might wand
    > > to buy, but I saw no way to see a sample of its content a la Amazon.
    > >
    > > I downloaded its code and saw some .rdoc files. I could view them as
    > > text, but that's obviously not the best approach. I saw a
    > > recommendation somewhere to view them in a browser. I dragged the
    > > filename into the browser, which produced a somewhat better result.
    > >
    > > I believe that the content of http://www.ruby-doc.org/stdlib-1.9.2//
    > > is based on generated rdoc's and look great in my browser. What do I
    > > have to do to get the same formatting in my browser for the rdoc's I
    > > downloaded?

    >
    > I don’t know the exact RDoc template they use at ruby-doc.org (I wish I
    > did, it’s great), but you can transform RDoc files into HTML just the
    > same way you transform Ruby documentation into HTML.
    >
    > $ rdoc file1.rdoc file2.rdoc file3.rdoc ...
    >
    > Note that under Ruby < 1.9 you have to install the `rdoc' gem first.
    >
    > Vale,
    > Marvin


    I got it working. I wrote up what I did and pasted an image of the Command Window when I was done. At the bottom you'll see the name of the html filethat was created, which creates a graphical report in the browser.

    There's enough there to reconstruct what I did and get the generated code.

    Thanks for your interest in my problem. All's well now.

    Best wishes,
    Richard
    RichardOnRails, Mar 16, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    513
    tdavisjr
    Jun 16, 2006
  2. Andreas Schwarz
    Replies:
    6
    Views:
    251
    Randy W. Sims
    Jan 1, 2004
  3. Brian Schröder
    Replies:
    5
    Views:
    133
    Dave Thomas
    Sep 18, 2004
  4. why the lucky stiff
    Replies:
    5
    Views:
    140
    why the lucky stiff
    Sep 22, 2004
  5. Daniel Berger
    Replies:
    1
    Views:
    142
    Dave Thomas
    Nov 2, 2004
Loading...

Share This Page