Ruby Platform

GiulioPiancastelli has released version 1.2 of the official Ruby port of Fit, compliant to the unofficial version 1.2 of the Fit official specification. RubyFIT's home page is hosted on RubyForge at and two trackers for bugs and patches are available from Source code is hosted on Github at so please disregard the Ruby codebases on both Fit's SourceForge repository and RubyFIT's RubyForge repository because they are old, uncomplete, and buggy.

See also DynamicTypeIssues for a discussion about problems encountered during the development of the port due to the highly dynamic nature of the Ruby language.

(For historical reason, below are still reported some development notes about a previous attempt to a Ruby Fit port by DaveThomas.)

Pragmatic DaveThomas is doing a translation of Fit to Ruby. Initial work is available for inspection. See RubyDownloads.

I seem to be having a problem or two with the Ruby implementation. It appears that it works fine on a case-insensitive but case-preserving filesystem, but on a case-sensitive system like Linux fit complains:

 Couldn't find file Fit/Summary
 ./fit/Fixture.rb:71:in `get_class'

It appears that it is expecting all path elements of "require"'d files to start with an upper-case letter. However, changing the directory fit to Fit causes all sorts of other issues because the runners expect to be able to require fit/*. For the moment I've solved this on my case-sensitive Linux filesystem by creating a symlink to make Fit and fit synonymous.

The second problem I'm having has to do with ColumnFixture. It seems that the framework is only handling the first method column and ignoring the rest. In the CalculatorExample, say, the first table has


and only the watts() method is called, points() is ignored (and uncolored in the output).

It appears that ColumnFixture.rb is setting @has_executed to true after the first cell but only resetting it to false on a new row. Resetting @has_executed to false at the beginning of do_cell seems to resolve that. --StevenNewton


Last edited October 14, 2009
Return to WelcomeVisitors