Dr Nic

My RubyGems development tools and workflow

The Open Source Developers Conference (osdc) is a nifty conference – people from different language communities, who all do open source, come together in harmony. They simultaneously snigger at each other and then proceed to steal each others ideas when they aren’t looking.

Miscellaneous idea possibly worth stealing from Perl: when you install Perl modules from CPAN it runs the module’s tests locally to confirm everything is oaky-dokey. You can manually do this via gem install --test rails, but its not the default. Nor have I ever used the --test flag. I just looked it up via gem help install. I like it.

Another CPAN thing to steal: For any RubyGem or perhaps Rails project on rubyforge/github/whatever, show the aggregate status of tests. Here’s a sample from CPAN. Lots of green lines but the aggregate change of this project working? 11%. I like the chart, and perhaps runcoderun or some other hosted CI service to generate a sexy graph of test outputs for dependencies.

Anyway, Ruby. I did a talk. I have slides.

Over time I’ve written a few RubyGems and am pretty happy with my basic tools and workflow for getting new gems out the door or maintaining existing projects. I use newgem + a patched version of hoe, I use git + github, and recently I started using runcoderun for hosted continuous integration.

If you’re new to creating your own RubyGems, perhaps my workflow and tools are a useful starting point to follow.

If you want an account with runcoderun, and I reckon you do, then hassle Rob Sanheim (twitter). For what its worth, tell him I said it was urgent.

There is now a sexy blog badge to show off the current pass/fail state of each of your projects, by Glenn Vanderburg. Badges are fun. It seems to clash with having github-badge in the same page, and there are other bugs with these badges. Probably my fault. I should investigate that soon.

Related posts:

  1. Hacking someone’s gem with github and gemcutter Ever used a rubygem, found a bug, and just...
  2. Future proofing your Ruby code. Ruby 1.9.1 is coming. Bugger. I’m a Ruby monogamist. I use the Ruby...
  3. Create and deploy command line apps with RubyGems RubyGems have many things going for them: they are a...
  4. [ANN] Generating new gems for graceful goodliness I don’t like you [1]. You don’t share code....

9 Responses to “My RubyGems development tools and workflow”

  1. [...] favorite Australian Ruby developer, Dr. Nic Williams, has put together a handy slide presentation called How to Package Your Ruby Code where he demonstrates how he packages his various bits of Ruby code using RubyGems. His process is [...]

  2. Jim Neath says:

    Great post, Nic.

    I’ve been meaning to learn about how to make gems for a while as I’m painfully clueless haha.

    I’ve just managed to make a gem that prints out my name 100 times.

    What more could you ever want in life?

  3. Rob Sanheim says:

    Hey Nic

    Thanks for the mention! For any of your readers who want to get rolling with RunCodeRun, you can use the invite code “drnic” to an account.

    - Rob
    Lead Developer, Chief Coffee Evangelist

  4. [...]  http://drnicwilliams.com/2008/12/05/my-rubygems-development-tools-and-workflow/ [...]

  5. [...] My RubyGems development tools and workflow If you’re new to creating your own RubyGems, perhaps my workflow and tools are a useful starting point to follow. (tags: rubygems tutorial) [...]

  6. Mat Schaffer says:

    If anyone out there has ever had the experience of installing the perl mysql adapter via CPAN (like me), they’ll probably disagree with having tests as the default when installing libraries. That particular library requires you to remove your db’s root password before you can install it because of how the tests were written. I’d hate to see the same madness happen to rubygems.

  7. Jacob Radford says:


    I’ve recently ported over the concept proposed in Python’s virtualenv ( http://pypi.python.org/pypi/virtualenv ) to ruby. It creates a sandbox area for rubygems where you can install only the ones you want (ignoring the system gems).

    Like to know what you think: http://github.com/nkryptic/sandbox

  8. Glenn Vanderburg says:

    Nic, I’ve delved a little into the conflict between your badges and mine; I’ll send you some details. Thanks for the mention!

  9. [...] This post was Twitted by tweetlicius [...]