Posted on Dec 30, 2009

To require or not require rubygems in your applications or libraries

NOTE Undusting this post as better response to a conversation in Tweeter, with tenderlove and nickseiger

Continue Reading

Posted on Dec 29, 2009

win32console 1.3.0 prerelease

I mentioned in previous post that I was working in a updated version of win32console.

So, just pushed to Gemcutter the prerelease version (_beta1_) so you guys can test with your current Cucumber/RSpec scenarios.

How to install prerelease versions?

All the RubyGems 1.3.x series sport the feature to prerelease gem installations. I recommend update to RubyGems 1.3.5 first in case you haven’t already, and proceed to install the gem:

gem install win32console --prerelease

The process will install version 1.3.0.beta1, which will be automatically available to any require done by Cucumber or RSpec.

What changed on this release?

As I mentioned before, there are a couple of changes required to support 1.9. On this release, I got rid of hardcoded translation tables used to convert codepages from input/output consoles.

How this affects me?

It will only affect you if you use accented characters in the output. If you do, then you should verify that your console codepage supports them. There is more information in the Cucumber wiki troubleshooting page

Now that text is sent transparently to the output, you have the control to feed the stream with different encodings and ensuring the output matches the console codepage.

A working example of this is located here

Please test it out so a formal 1.3.0 release can be done the upcoming days.

Cheers!

Posted on Dec 17, 2009

win32console upcoming changes and feedback

For the ones not aware of, win32console (originally here, gemified here) is a project that provides ANSI coloring for Windows.

Yeah, Windows doesn’t do ANSI coloring like any POSIX terminal, and it has it’s own API with extended control of the console functionality.

Continue Reading

Posted on Dec 16, 2009

rake-compiler: safe list of Ruby versions that can be cross-compiled

Seems that I’m going to suffer a series of bug reports in the upcoming weeks due continious changes between patchlevels of Ruby.

To give some background, for the fresh ones just arriving to the blog. rake-compiler provides, besides C/Java extension standardization structure, the ability to cross-compile versions of Ruby to allow developers on Linux/OSX build and release gems for users running Windows.

Seems that latest patchlevels of Ruby 1.8.7 (172) and 1.9.1 (376) cannot be cross compiled.

I’ve reported that to Ruby’s bug tracker under issues #2464 and #2484

From what you can read there, there is a clear change in the rules about what is the minimum Ruby version that can be used to cross compile (known as BASERUBY)

Now, being pointed to the Developer’s Howto page, and checking the history and time, it is clear the note about the limitation is really fresh

The funny thing is that I still can cross compile 1.9.2dev using 1.8.6! Which is contrary to what the recently edited howto states!

Don’t get me wrong, I have no personal issue besides being annoyed, and that will require put some lock in cross-ruby compilation to avoid bug reports about something that is beyond my control.

So, with the goal of making this public and have a link to include in my canned response to people reporting bugs about it, the following is the list of versions and patchlevels of Ruby that I know works and aim to support in relation to bug fixes of rake-compiler itself:

Version Patchlevel supported? Command
1.8.6 287 Yes rake-compiler cross-ruby
1.8.6 383 Yes rake-compiler cross-ruby VERSION=1.8.6-p383
1.8.6 398 Yes rake-compiler cross-ruby VERSION=1.8.6-p398
1.8.7 72 NO
1.8.7 173 NO
1.8.7 249 NO
1.8.7 299 NO
1.9.1 243 Yes rake-compiler cross-ruby VERSION=1.9.1-p243
1.9.1 376 NO
1.9.1 378 NO
1.9.2 trunk Yes (that is true up to revision 26108)

Tricky list, even switching the version of Ruby to match the one desired to be installed, it doesn’t work (reported as #2485, I’m very persistent).

So, apologies to anyone having issues with this: I’m having the same ones here.

Update: Added 1.8.7-p299 to the list of no compatible

Update 2: Added 1.8.6-p398 to the list of compatibles and 1.8.7 still is not cross-compilable, sorry. 1.9.1-p378 is not cross-compilable either.