My Stuff

2010 Conferences

OSGi DevCon @ JAX London

February 23 - Keynote titled OSGi in the Enterprise: Agility, Modularity, and Architecture’s Paradox

EclipseCon

March 22 - 25 - Tutorial on Modular Architecture

Über Conf

June 14 - 17 - Sessions titled Turtles and Architecture and Patterns of Modular Architecture

Catalyst

July 26 - 30 - Two sessions on rich mobile applications and one on agile development. Half day tutorial on software process improvement.

Tweets @ Twitter

Gearing up for lots of conversation today. Mobile dev., app arch., and some questions for @springrod. Plus a video shoot. #cat10 22 hrs ago

Great feedback on RMA sessions at #cat10 today. Lot's of fun. Look forward to more interaction on the topic tomorrow (and tonight perhaps)! 1 day ago

.@atmanes Did I say "process"? Meant "progress". in reply to atmanes 1 day ago

RT @dalmaer RT @lukew: Comic: the real reason you should design for Mobile First! http://bit.ly/bhKSV6 #thanksron 1 week ago

anyone know if current webOS version (1.4.1.1?) fixes the aGPS problem on Verizon? Does Google Maps lockin the location efficiently? 1 week ago

LinkedIn Profile

The opinions expressed on this site are my own, and not necessarily those of my employer.

Rake TestTask Hangs

Filed Under Development, Platforms, Ruby |  

Here’s the test task in my rake file. Works on Windows, but not on my Mac. It just hangs. What’s the problem?

Rake::TestTask.new do |t|
  t.libs << "./app;./test"
  t.test_files = FileList['test/test*.rb']
  t.verbose = true
end

Two hours later, I tell you that I need this on my Mac.

Rake::TestTask.new do |t|
  t.libs << "./app:./test"
  t.test_files = FileList['test/test*.rb']
  t.verbose = true
end

See the difference? Semi-colon…colon…Wow…

Comments

6 Responses to “Rake TestTask Hangs”

  1. Robert Fischer on August 11th, 2007 3:48 pm

    Does Rake have some kind of OS-sensitive path-maker function? That’s the kind of difficult-to-debug problem which could really use some abstraction…

  2. kirk on August 13th, 2007 2:31 am

    Obviously not that I know of…:-). I made the same mistake in Java a while back with the file separator, and quickly changed my code to use the system property instead of hardcoding the back/forward slash.

  3. Bruce Williams on August 20th, 2007 2:10 am

    IIRC, Ruby automatically converts file path separators for file operations (so using / vs \ isn’t a problem and there’s no need to use File::SEPARATOR).

    As to this problem — I’ve never seen someone try a colon/semicolon, environment variable style — I’m more surprised it worked at all (since it’s $: that’s being modified). I’d use t.libs += %w(app lib), and skip the ./s, since they’re superfluous.

  4. Bruce Williams on August 20th, 2007 2:12 am

    I meant t.libs += %w(app test), obviously ;-)

  5. kirk on August 21st, 2007 1:26 pm

    Bruce,

    I’m pretty sure I picked up the syntax from the Pickaxe book. While I enjoy Ruby, I’m no expert, so thanx for the tip on a better way of doing things.

  6. Bruce Williams on August 22nd, 2007 9:36 pm

    Kirk, np :-)

Leave a Reply