[Rake-devel] Unable to run when ruby is installed in directory witha space

Jim Weirich jim at weirichhouse.org
Tue Apr 12 12:47:00 EDT 2005

Josh Knowles said:
> With the latest version of rake installed (0.5.3) and ruby 1.8.2
> running on Windows installed under "c:\Programe Files" I get the
> following error:
> C:\Documents and Settings\jknowles\Desktop\taskthis-0.3>rake test_units
> (in C:/Documents and Settings/jknowles/Desktop/taskthis-0.3)
> ruby -Ilib;test c:/program
> files/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake
> /rake_test_loader.rb test/unit/taskitem_test.rb test/unit/tasklist_test.rb
> test/
> unit/user_test.rb
> ruby: No such file or directory -- c:/program (LoadError)
> rake aborted!
> Command failed with status (1): [ruby -Ilib;test c:/program
> files/ruby/lib/...]
> I have attempted to track down the problem but am having little luck.
> Can someone point me in the right direction as to where I need to add
> the  ' 's.

Thanks for the heads up about the problem.  It should be simple to fix.

In the meantime, you can use an alternate test loader.  In your rakefile,
add a "t.loader = :testrb" line, something like this ...

  Rake::TestTask.new do |t|
    t.test_files = FileList['test/test_*.rb']
    t.verbose = true
    t.loader = :testrb

That will switch to use the testrb loader that comes with Test::Unit.  (I
generally don't use the testrb loader because it tends to swallow syntax
errors without any messages.)

I'll have a new version of Rake out in the next day or so.

-- Jim Weirich     jim at weirichhouse.org    http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rake-devel mailing list