Windows rspec "gem install win32console"

View: New views
11 Messages — Rating Filter:   Alert me  

Windows rspec "gem install win32console"

by johnnybutler7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

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

Re: Windows rspec "gem install win32console"

by johnnybutler7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have removed the --colour from the spec.opts file to see if it was just a colour problem.

I now get this error below, i am using rails 1.2.2:

** 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
** Invoke spec:controllers (first_time)
** Invoke db:test:prepare
** Execute spec:controllers
** Invoke spec:helpers (first_time)
** Invoke db:test:prepare
** Execute spec:helpers
** Invoke spec:views (first_time)
** Invoke db:test:prepare
** Execute spec:views
rake aborted!
RSpec failures
C:/Documents and Settings/JohnButler/My Documents/Ruby on Rails/eclipse/workspace/Workspace/sports/config/../vendor/plugins/rspec_on_rails/tasks/rspec.rake:32
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

I really want to use RSpec with my rails development but cant it running properly.

JB




johnnybutler7 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

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

Re: Windows rspec "gem install win32console"

by David Chelimsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/6/07, johnnybutler7 <JohnnyButler7@...> 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@...
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by johnnybutler7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your reply.

No i have not upgraded to Vista, im still on windows XP.  I only installed rspec yesterday and think i have followed the instructions correctly from here http://rspec.rubyforge.org/documentation/rails/install.html.  I am running rails 1.2.2 which may be different to current rspec rails windows users.  Im stll have the same problems mentioned in the last posts.

Im really stumped now.

John B




I have removed the --colour from the spec.opts file to see if it was just a colour problem.

I now get this error below, i am using rails 1.2.2:

** 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
** Invoke spec:controllers (first_time)
** Invoke db:test:prepare
** Execute spec:controllers
** Invoke spec:helpers (first_time)
** Invoke db:test:prepare
** Execute spec:helpers
** Invoke spec:views (first_time)
** Invoke db:test:prepare
** Execute spec:views
rake aborted!
RSpec failures
C:/Documents and Settings/JohnButler/My Documents/Ruby on Rails/eclipse/workspace/Workspace/sports/config/../vendor/plugins/rspec_on_rails/tasks/rspec.rake:32
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

I really want to use RSpec with my rails development but cant it running properly.

JB




johnnybutler7 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

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


Re: Windows rspec "gem install win32console"

by johnnybutler7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

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@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@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by David Chelimsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/6/07, johnnybutler7 <JohnnyButler7@...> 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@...> 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@...
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users@...
> > 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@...
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by johnnybutler7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

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@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@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@rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users@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@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by David Chelimsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/6/07, johnnybutler7 <JohnnyButler7@...> 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@...> 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@...> 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@...
> >> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >> >>
> >> > _______________________________________________
> >> > rspec-users mailing list
> >> > rspec-users@...
> >> > 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@...
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users@...
> > 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@...
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by Kevin Williams-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My rails app seems to be broken today (pgsql 8.2 problem), but I ran
the specs successfully yesterday. Rails 1.2.2, rspec 0.8.2,
win32console 1.0.8.

I'm kind of a power user though. My Start => All Programs menu fills
my entire screen, and I have all the UnxUtils binaries in my path. :-]

On 3/6/07, David Chelimsky <dchelimsky@...> wrote:

> On 3/6/07, johnnybutler7 <JohnnyButler7@...> 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@...> 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@...> 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@...
> > >> >> http://rubyforge.org/mailman/listinfo/rspec-users
> > >> >>
> > >> > _______________________________________________
> > >> > rspec-users mailing list
> > >> > rspec-users@...
> > >> > 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@...
> > >> http://rubyforge.org/mailman/listinfo/rspec-users
> > >>
> > > _______________________________________________
> > > rspec-users mailing list
> > > rspec-users@...
> > > 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@...
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
> _______________________________________________
> rspec-users mailing list
> rspec-users@...
> http://rubyforge.org/mailman/listinfo/rspec-users
>


--
Cheers,

Kevin Williams
http://www.almostserio.us/

"Any sufficiently advanced technology is indistinguishable from
Magic." - Arthur C. Clarke
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by Aslak Hellesoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/6/07, johnnybutler7 <JohnnyButler7@...> 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.
>
> This is the full message with --trace
>

The exception you are getting is thrown from line 26 in command_line.rb
(http://rubyforge.org/viewvc/tags/REL_0_8_2/rspec/lib/spec/runner/command_line.rb?revision=1561&root=rspec&view=markup)

Looking at line 26 of that file and the error message you are getting:
"File or directory not found:  (RuntimeError)" it looks like the
file_or_dir variable in command_line.rb is nil or an empty string.

I see you have lots of spaces in your paths. This could be the source
of the problem.
Please try to run your code from a path without spaces, then report
back. It will tell us whether we should hunt for a bug related to
spaces in filenames or something else.

Thanks,
Aslak

> (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@...> 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@...> 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@...
> >> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >> >>
> >> > _______________________________________________
> >> > rspec-users mailing list
> >> > rspec-users@...
> >> > 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@...
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users@...
> > 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@...
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

Re: Windows rspec "gem install win32console"

by johnnybutler7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ok, ive made a bit of progress now.

If i open a command window and do a spec spec/models --colour this works correctly and gives me my coloured output.

If i use rake and add the coloured to the spec.opts file i still get the "gem install win32console error"

Everything else is working fine now, suppose i can do without the colour for the rake tasks but it would be nice.

thanks

JB

Kevin Williams-2 wrote:
My rails app seems to be broken today (pgsql 8.2 problem), but I ran
the specs successfully yesterday. Rails 1.2.2, rspec 0.8.2,
win32console 1.0.8.

I'm kind of a power user though. My Start => All Programs menu fills
my entire screen, and I have all the UnxUtils binaries in my path. :-]

On 3/6/07, David Chelimsky <dchelimsky@gmail.com> wrote:
> On 3/6/07, johnnybutler7 <JohnnyButler7@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@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@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@rubyforge.org
> > >> >> http://rubyforge.org/mailman/listinfo/rspec-users
> > >> >>
> > >> > _______________________________________________
> > >> > rspec-users mailing list
> > >> > rspec-users@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@rubyforge.org
> > >> http://rubyforge.org/mailman/listinfo/rspec-users
> > >>
> > > _______________________________________________
> > > rspec-users mailing list
> > > rspec-users@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@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


--
Cheers,

Kevin Williams
http://www.almostserio.us/

"Any sufficiently advanced technology is indistinguishable from
Magic." - Arthur C. Clarke
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users