[rspec-users] Windows rspec "gem install win32console"

David Chelimsky dchelimsky at gmail.com
Tue Mar 6 11:43:08 EST 2007


On 3/6/07, johnnybutler7 <JohnnyButler7 at gmail.com> wrote:
>
> Yes,  thats why i cant understand why i am getting this error message.  I
> used ./script/generate rspec_model User and that created the user_spec.rb
> file in the spec/models folder.

Unfortunately (or fortunately, depending on your view), I don't have a
winbox w/ everything  set up to troubleshoot this. Is there anyone
else on the list who can chime in who is successfully using
Spec::Rails 0.8, Rails 1.2.2 on windows?

>
> This is the full message with --trace
>
> (in C:/Documents and Settings/JohnButler/My Documents/Ruby on
> Rails/eclipse/workspace/Workspace/sports)
> ** Invoke spec:models (first_time)
> ** Invoke db:test:prepare (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Execute db:test:prepare
> ** Invoke db:test:clone (first_time)
> ** Invoke db:schema:dump (first_time)
> ** Invoke environment
> ** Execute db:schema:dump
> ** Invoke db:test:purge (first_time)
> ** Invoke environment
> ** Execute db:test:purge
> ** Execute db:test:clone
> ** Invoke db:schema:load (first_time)
> ** Invoke environment
> ** Execute db:schema:load
> ** Execute spec:models
> C:/ruby/bin/ruby -I"C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib"
> "C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec"
> "spec/models/user_spec.rb" --options "C:/Documents and
> Settings/JohnButler/My Documents/Ruby on
> Rails/eclipse/workspace/Workspace/sports/config/../spec/spec.opts"
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/command_line.rb:26:in
> `run': File or directory not found:  (RuntimeError)
>         from
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/command_line.rb:18:in
> `each'
>         from
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/command_line.rb:18:in
> `run'
>         from
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/option_parser.rb:149:in
> `parse'
>         from C:/ruby/lib/ruby/1.8/optparse.rb:1218:in `call'
>         from C:/ruby/lib/ruby/1.8/optparse.rb:1218:in `order!'
>         from C:/ruby/lib/ruby/1.8/optparse.rb:1205:in `catch'
>         from C:/ruby/lib/ruby/1.8/optparse.rb:1205:in `order!'
>         from C:/ruby/lib/ruby/1.8/optparse.rb:1279:in `permute!'
>         from C:/ruby/lib/ruby/1.8/optparse.rb:1300:in `parse!'
>         from
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/option_parser.rb:185:in
> `parse'
>         from
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/option_parser.rb:18:in
> `create_context_runner'
>         from
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/runner/command_line.rb:14:in
> `run'
>         from C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec:4
> rake aborted!
> Command failed with status (1): [C:/ruby/bin/ruby
> -I"C:/ruby/lib/ruby/gems/...]
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `call'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `ruby'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `ruby'
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/rake/spectask.rb:126:in
> `define'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:831:in `verbose'
> C:/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/rake/spectask.rb:105:in
> `define'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `call'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `each'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'
> C:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `each'
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
> C:\ruby\lib\ruby\gems\1.8\gems\rake-0.7.1\bin\rake:7
> -e:3:in `load'
> -e:3
>
>
>
> David Chelimsky-2 wrote:
> >
> > On 3/6/07, johnnybutler7 <JohnnyButler7 at gmail.com> wrote:
> >>
> >> Hi,
> >>
> >>  i have got RSpec to work on my machine now.  I created a new app and
> >> followed the instructions again.  If i navigate to the spec folder int he
> >> rails directory and type spec user_spec.rb then this works fine.  If i
> >> try
> >> the rake command
> >>
> >> rake spec:models
> >
> > This rake task assumes model specs are in spec/models. Is user_spec.rb
> > at spec/models/user_spec.rb?
> >
> >>
> >> first of all i get the "gem install win32console", so if i remove the
> >> --colour from the options i get the error i posted above. Its basically
> >> saying it cannot find the spec files.  Do i need to set the path
> >> somehwere
> >> so when i do a rake spec:models it knows where to find them?
> >>
> >> John B
> >>
> >>
> >>
> >>
> >> David Chelimsky-2 wrote:
> >> >
> >> > On 3/6/07, johnnybutler7 <JohnnyButler7 at gmail.com> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> Hi I am trying to use RSPEC on windows and i keep getting the
> >> following
> >> >> error
> >> >>
> >> >> "You must gem install win32console to use colour on Windows"
> >> >>
> >> >> I have installed this Gem but i am still getting the same error.  The
> >> >> file that error is coming from is:
> >> >>
> >> C:\ruby\lib\ruby\gems\1.8\gems\rspec-0.8.2\lib\spec\runner\formatter\base_text_formatter.rb
> >> >
> >> > That line reads as follows:
> >> >
> >> > begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/
> >> > ; rescue LoadError ; raise "You must gem install win32console to use
> >> > colour on Windows" ; end
> >> >
> >> > So it seems odd that your rspec was complaining even after you
> >> > installed the plugin. There are people are using rspec on windows w/
> >> > some success, so I'm not convinced the problem is in rspec alone - it
> >> > seems to be in rspec in conjunction w/ your particular system.
> >> >
> >> > Any chance you recently upgraded to Vista? Maybe the environment
> >> > variables have changed?
> >> >
> >> > David
> >> >
> >> >>
> >> >> Do i need to put this line of code in?  Where do i put it?
> >> >> require 'Win32/Console/ANSI'
> >> >>
> >> >> Can anyone help me, ive searched the web but cant seem to find a
> >> >> solution.
> >> >>
> >> >> JB
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Windows-rspec-%22gem-install-win32console%22-tf3354239.html#a9328370
> >> >> Sent from the rspec-users mailing list archive at Nabble.com.
> >> >>
> >> >> _______________________________________________
> >> >> rspec-users mailing list
> >> >> rspec-users at rubyforge.org
> >> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >> >>
> >> > _______________________________________________
> >> > rspec-users mailing list
> >> > rspec-users at rubyforge.org
> >> > http://rubyforge.org/mailman/listinfo/rspec-users
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Windows-rspec-%22gem-install-win32console%22-tf3354239.html#a9333516
> >> Sent from the rspec-users mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> rspec-users mailing list
> >> rspec-users at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Windows-rspec-%22gem-install-win32console%22-tf3354239.html#a9334771
> Sent from the rspec-users mailing list archive at Nabble.com.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list