[rspec-users] Rspec 1.1.2 on Windows

BenFyvie ben.fyvie at champsoftware.com
Tue Jan 22 11:08:44 EST 2008

Luis Lavena wrote:
> On Jan 21, 2008 6:53 PM, BenFyvie <ben.fyvie at champsoftware.com> wrote:
>> I am using Rspec 1.1.2 on Windows XP SP2
>> I am receiving the following error when I run 'rake spec' from a brand
>> new
>> project:
>> C:/SVN_Projects/rspec/vendor/plugins/rspec/lib/spec/runner/options.rb:107:in
>> `colour=': You must gem install win32console to use colour on Windows
>> (RuntimeError)
>> I have the win32console gem installed and the error still occurs.  It
>> seems
>> that the require statement in options.rb line 105 is throwing an
>> exception
>> and I am not sure why.  I have even gone to the extent of replacing
>> 'Win32/Console/ANSI' with the absolute path to the ANSI file and still no
>> luck.  When I run the require statement in a console everything works
>> fine
>> and dandy.
>> Now if I remove the --colour option from the spec.opts file then it
>> doesn't
>> need the win32console gem; however, I then receive this error:
>> C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
>> `const_missing': uninitialized constant Spec::Rails (NameError)
>> I do have the rspec_on_rails plugin installed.  Can anyone offer me any
>> suggestions on how to troubleshoot this issue? Thanks in advance!
> I'll be looking into this tonight, since I already reported that, but
> using rake and spec command only:
> http://rspec.lighthouseapp.com/projects/5645/tickets/244-no-coloured-output-on-windows-due-missing-rubyopt
> It seems that --colour affects not only lib/runner/options.rb, but
> other places too.
> Maybe we should change the behavior for windows and revert to false if
> Win32/Console/ANSI is not found instead of raising a exception.
> David, Aslak?
> -- 
> Luis Lavena
> Multimedia systems
> -
> A common mistake that people make when trying to design
> something completely foolproof is to underestimate
> the ingenuity of complete fools.
> Douglas Adams
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Thanks Luis,

I used the code in your lighthouse case and I am now able to load the
win32console gem.  However I am still not able to run tests because of the
second problem I that I mentioned before with the uninitialized constant for
Spec::Rails.  I see at least one other person with this problem, but no
resolution.  http://www.ruby-forum.com/topic/135888 

Care to help me troubleshoot this issue as well?  I've got the
rspec_on_rails plugin installed and my spec_helper.rb is requiring


View this message in context: http://www.nabble.com/Rspec-1.1.2-on-Windows-tp15006297p15022159.html
Sent from the rspec-users mailing list archive at Nabble.com.

More information about the rspec-users mailing list