RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Bdoc: A Better Gem Doc Browser

Bdoc (DEMO) is a simple alternative to gem server. It allows you to browse your local gem docs without running a server. The UI is clean, simple, and allows you to cross navigate between gems. 1) Install: [sudo] gem install manalang-bdoc, 2) Usage: terminal> bdoc. Fork me @ GitHub

Comments

Rich,

nice idea. However, I’ve got exception: opt/local/lib/ruby/gems/1.8/gems/manalang-bdoc-0.1.1/lib/Bdoc.rb:57:in `read’: No such file or directory - templates/index.html

You have to use absolute path (it’s probably work if you test yout application within project directory, but doesn’t work outside). Quick fix:

def generate_index
  @gems = gems_with_doc_index
  index = ERB.new(File.read(File.join(File.dirname(__FILE__), '..', "templates","index.html"))).result(binding) ...
end

Also, you have to display gems installed for the user in:

~/.gem/ruby/1.8/gems/

folder.

Thanks… fixed, tested and pushed to github… new ver 0.1.2.

Bdocs now looks at all the gems you have installed including those in ~/.gem

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in