Saturday, January 20

That Didn't Take Long

One day into development and I've already got a rant... but it's a tame one.

I needed to do some Globally Unique Identifier (GUID) generation for my new project so I Googled up "ruby guid" and arrived at this convenient little library.

Somebody has already done the work for me, and shared it! I love that. My thanks go out to the author.

I downloaded it, installed it, incorporated it, tested it, and everything was golden... on my Windows machine.

After I committed to source control and ran an update on my Mac to continue development there, I started getting this error:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': No such file to load -- Win32API (MissingSourceFile)

Oops, that's rather queer. Why would the code running on OSX be attempting to load a Windows API?

Thanks to the wonders of Open Source Software (and the author) I was able to look at the offending line and this is what I found:

if RUBY_PLATFORM =~ /win/i

The author reports on his download site that he "only tested this library under Win2k and Redhat," so he didn't realize or anticipate another environment other than Windows that might have "win" in its name... like, maybe, Darwin :-)

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.