Forum: Ruby on Rails Searchable Rails API Doc

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bbee57a05b72bd3c29c1e48551a816f4?d=identicon&s=25 voloko (Guest)
on 2009-03-16 15:40
(Received via mailing list)
I’ve been using rails and rails’ doc for quite a while now. And I
always missed the search feature in docs. IMHO browser search in page
is not the best solution. So i’ve spent this weekend trying to improve
things a bit.
This is more a proof of concept than a final product.
http://voloko.ru/sdoc/rails/
and on github: http://github.com/voloko/sdocrails/tree/master (custom
rdoc generator and template)
Any feedback is appreciated. Thanks
1e7782e67bb34c9c67ed19d5cde5f4eb?d=identicon&s=25 Tom Z Meinlschmidt (Guest)
on 2009-03-16 15:48
(Received via mailing list)
Hi,

it looks great. one small issue - try to search 'link_to' and the last
result item is:

secret_key_generator.rb
railties/lib/rails_generator/secret_key_generator.rb

which has nothing to do with link_to .. see how did you perform the
search :)

tom

voloko wrote:
>
--
===============================================================================
Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

www.meinlschmidt.com  www.maxwellrender.cz  www.lightgems.cz
===============================================================================
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2009-03-16 18:45
(Received via mailing list)
Very nice.
Bbee57a05b72bd3c29c1e48551a816f4?d=identicon&s=25 voloko (Guest)
on 2009-03-16 18:46
(Received via mailing list)
It has all the letters from "link_to"
railties/<b>l</b>ib/ra<b>i</b>ls_ge<b>n</b>erator/secret_<b>k</
b>ey<b>_</b>genera<b>t</b><b>o</b>r.rb

It tries to find by exact match first (so link_to is always above) and
then resorts to textmate-like matching (to find password() by
"pswd").
872535e214a9e3a98889bd8d069f0294?d=identicon&s=25 "Wolas!" (Guest)
on 2009-03-17 11:26
(Received via mailing list)
i like it!

i assume you guys know about www.railsbrain.com? maybe it has some
good ideas for this project
39b6dd2426fe9571f8e4ebd759b3757f?d=identicon&s=25 swachian (Guest)
on 2009-03-25 03:43
(Received via mailing list)
I use the command 'sdoc' to generate searchable doc for ruby1.8 and it
gets wrong when generating SHTML. The error report is

  /lib/sdoc/generators/shtml_generator.rb:282:in `to_json': source
sequence is illegal/malformed (JSON::GeneratorError)
../lib/sdoc/generators/shtml_generator.rb:282:in `gen_search_index'

can it be fixed?
Bbee57a05b72bd3c29c1e48551a816f4?d=identicon&s=25 Vladimir Kolesnikov (voloko)
on 2009-03-25 11:16
swachian wrote:
> I use the command 'sdoc' to generate searchable doc for ruby1.8 and it
> gets wrong when generating SHTML. The error report is
>
>   /lib/sdoc/generators/shtml_generator.rb:282:in `to_json': source
> sequence is illegal/malformed (JSON::GeneratorError)
> ../lib/sdoc/generators/shtml_generator.rb:282:in `gen_search_index'
>
> can it be fixed?

Yep. Set
$KCODE = 'UTF-8' in your Rakefile (that's the way rails does)
or reinstall the gem (it now uses  -KU ruby option by default)
This topic is locked and can not be replied to.