My RDoc Setup

Posted by Ed on March 8th, 2010 under Ruby, RubyGems, Self Reference  •  2 Comments

I used to keep rdoc and ri turned off to speed up gem installs via my .gemrc config. This became problematic recently when I was planning on doing some work while traveling, and knew I wouldn’t have an always on internet connection to get my documentation fix. I recalled a post by Jason Seifer I had seen that described how to generate your docs with a better template and host them as a passenger application. I decided to use that as a starting point to getting my docs generated in a format I liked and setting things up so that they would always be generated that way.

Jason’s instructions tell us to install the “hanna” template via `gem install mislav-hanna` which is out of date, so we will use the most current instructions from the gems github page to install the template. No big deal, just drop the github username from the gem install command like this…

The “hanna” template absolutely kills the default rdoc template. You’ve probably seen it around being used by various projects and there’s no reason not to use it locally.

Next I updated my .gemrc to ignore ri and to use the “hanna” template for rdocs.

Finally I re-generated my rdocs by running:

I ignored the rest of the steps in the aforementioned post as I don’t really feel the need to be running a passenger instance just to serve rubygems docs. I generally just run `gem server` whenever I need to access my local docs.

My solution is barely more than what you get out of the box with rubygems but with just a few changes I find myself much happier with my local docs.

Readability for sane online reading

Posted by Ed on November 25th, 2009 under Web  •  No Comments

If Readability isn’t in your bookmark menu bar, then there is something missing. I’ve been using arc90’s Readbility bookmarklet for a while now and thought it was probably a well known thing, maybe I was wrong. Last night I showed it to some people at the B’more on Rails Open Source Hack Night and no one had heard of it before. So, if you’re ever bothered by reading news online surrounded by ads and extraneous content check it out. Here is a sample of what it can do…

Before & After Readability:

BeforeReadbility.jpgAfterReadability.jpg

Deploying Sinatra with Passenger on Dreamhost

Posted by Ed on June 29th, 2009 under Dreamhost, Passenger, Ruby, Sinatra  •  No Comments

If the following is true:

  1. You want to deploy a Sinatra application with Passenger on Dreamhost
  2. You’re using a Dreamhost shared hosting account
  3. You’re application relies on gems that aren’t installed globally on Dreamhost
  4. You’ve got the gems you need installed locally like this

Then you’ll want to include something like this in your rackup file:

This will make sure your locally installed gems will be available to your application. Maybe my google skills are getting rusty, but it took me a while to find this solution. Here’s the original source.

OS X, Full Keyboard Access, and Web Forms

Posted by Ed on May 20th, 2009 under OS X  •  No Comments

For a while now I’ve been frustrated to find that when tabbing through a web form in Firefox select inputs don’t gain focus. I sat down today to research what it was that they were doing wrong so that I could avoid making the same mistake, and write a post describing the issue. What I found though was that it wasn’t the sites fault or the browsers. It turns out that what I was experiencing was merely a result of an OS X setting which determines what elements on the screen are able to get focus via tabbing. The default functionality is for OS X to only let you tab onto text inputs and lists. To change this you need to go to System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts and then turn on “Full Keyboard Access”. What’s more is that Safari ignores this setting entirely so while browsing in Safari you can tab onto select inputs whether full keyboard access is turned on or not. Who knew?

Cross browser CSS inspector –> XRAY

Posted by Ed on March 23rd, 2009 under CSS, Web Development  •  No Comments

I may be a little late to the game on this one, but I just came across XRAY. XRAY is a bookmarklet that lets you inspect all of the CSS properties associated with any element in the web page you’re currently viewing. Best of all, it works in all of the browsers I use for testing plus some (Internet Explorer 6+, and Webkit and Mozilla based browsers – including Safari, Firefox, Camino or Mozilla). I’m still going to use Firebug and the IE Developer Toolbar for digging deep into a page and tweaking properties to get things just right, but having a common user interface across browsers for simple CSS inspection is great.