Meditations on programming, startups, and technology
New Relic

Ruby and Rails books, Textmate and FastRi

  • Ruby and Rails books keep popping up on the (virtual and real) shelves, which means that it may be slightly puzzling for newcomers to decide which books to spend their hard earned cash on. In the spirit of providing guidance in this process, I’ve prepared the Recommended Books for Ruby and Rails page. The recommendations are organized by skill level and should provide the reader with a nice logical sequence of increasingly more challenging reading material, making the task of identifying valid books easier for the new developer or student.
  • The more I become acquainted with Textmate, the more I’m impressed by such a nice little editor. I’ve had next to no time to play with it, and yet I’ve already added new functionalities to some of the existing bundles. In particular, I’ve committed a patch that extends the Textile bundle features, and I’ve become the maintainer of that bundle, with SVN access. Textmate bundles are very easy to customize and extend, and this flexibility is really appreciated from a development standpoint.
  • ri is an indispensable tool for the Ruby programmer, however you may have noticed that it’s a bit sluggish. If you haven’t done it already, do yourself a big favor and install the FastRi gem. FastRi provides various enhancements and advanced functionalities over the standard ri tool. But even when it’s used simply as a replacement for ri locally, it is significantly faster, and in my opinion more practical. Also, if you look for String#o for example, ri provides you with all the methods of the class String, that contain the letter ‘o’. While FastRi outputs only the methods starting with the letter ‘o’, which is what you actually want in most cases. Install with: $ sudo gem install fastri and $sudo fastri-server -b . Then use it in this way (qri is used for stand-alone mode, fri to connect to a remote server): $ qri String#scan.

If you enjoyed this post, then make sure you subscribe to my Newsletter and/or Feed.

receive my posts by email

2 Responses to “Ruby and Rails books, Textmate and FastRi”

  1. dclausen says:

    It’s possible to query fast-ri’s documentation from within TextMate.

    Get Dr Nic’s Rails TextMate bundle here:
    http://github.com/drnic/ruby-on-rails-tmbundle/tree/

    edit: ~/Library/Application\ Support/TextMate/Bundles/Ruby on Rails.tmbundle/Commands/Documentation\ for\ Word.tmCommand

    comment out the existing command that queries apidock.com like so:

    <!–#!/usr/bin/env ruby
    url = “http://apidock.com/rails/search/quick?query=” + ENV[‘TM_CURRENT_WORD’]
    puts “<meta http-equiv=’Refresh’ content=’0;URL=#{url}’>”
    –>

    and add in it’s place:

    #!qri ENV[‘TM_CURRENT_WORD’]

    then highlight a method you’d like documentation on, and press Control-H.

  2. dclausen says:

    forgot that you have to reload TextMate’s bundles after the edit:

    osascript -e ‘tell app “TextMate” to reload bundles’

Leave a Reply

I sincerely welcome and appreciate your comments, whether in agreement or dissenting with my article. However, trolling will not be tolerated. Comments are automatically closed 15 days after the publication of each article.

Current ye@r *

Copyright © 2005-2014 Antonio Cangiano. All rights reserved.