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!

Easy-access rdocs

Shorten your access time to gem rdocs with this shell script.

Comments

I needed to add a / to line 3 to become:

open $gemdir/doc/`ls $gemdir/doc/ | grep $1 | sort | tail -1`/rdoc/index.html

The extra slash is before “rdoc/index.html”

This looks awesome, but I’m getting: Couldnt get a file descriptor referring to the console Could not get a file descriptor referring to the console when I try to run it. I’m on Ubuntu 7.10, btw.

Dr. Nic: Thanks, I’ve fixed it. My bash profile also has alias ls="ls -FG", which adds a trailing slash to directories, so this one slipped under the radar.

openBack: Are you using bash as your shell? What’s the output of $ echo $SHELL?

stephencelis: yes, it’s bash echo $SHELL /bin/bash

For those who have made the switch to the fantastic Fish shell this functionality is one of many nuggets contained in the Fish nuggets project at Gitorious.

Along with Capistrano + git + Rake completions, of course.

openBack: it hit me! open is a shortcut on OS X to bring up your web browser. Just substitute open with whatever command you use to open your browser.

There’s also gemdocs.

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