Cucumber on Cygwin

174 views
Skip to first unread message

catalogs

unread,
Nov 24, 2009, 5:56:33 AM11/24/09
to Cukes
I posted a message requesting assistance with a Cygwin problem but it
has not appeared. This is my first posting to the Cukes list, which is
perhaps the reason.

catalogs

unread,
Nov 24, 2009, 8:03:38 AM11/24/09
to Cukes
The original post did not appear so I will add it here:

Mac user and Win XP user collaborating (client dictates XP platform) -
rake cucumber runs OK on Mac
e.g.
43 scenarios (43 passed)
284 steps (284 passed)

checked gem list to ensure versions same on both platforms and updated
to ensure project the same but get the following on Win XP Cygwin

/usr/bin/ruby.exe -I "/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/
lib:lib" "/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/cucumber" --
color --tags ~@wip --strict --format pretty
undefined local variable or method `capture_model' for main:Object
(NameError)
./features/step_definitions/pickle_steps.rb:4
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'

Any guidance appreciated

Matt Wynne

unread,
Nov 24, 2009, 12:08:46 PM11/24/09
to cu...@googlegroups.com

On 24 Nov 2009, at 13:03, catalogs wrote:

> The original post did not appear so I will add it here:
>
> Mac user and Win XP user collaborating (client dictates XP platform) -
> rake cucumber runs OK on Mac
> e.g.
> 43 scenarios (43 passed)
> 284 steps (284 passed)
>
> checked gem list to ensure versions same on both platforms and updated
> to ensure project the same but get the following on Win XP Cygwin
>
> /usr/bin/ruby.exe -I "/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/
> lib:lib" "/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/cucumber" --
> color --tags ~@wip --strict --format pretty
> undefined local variable or method `capture_model' for main:Object
> (NameError)
> ./features/step_definitions/pickle_steps.rb:4
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>
> Any guidance appreciated

> We updated to run 0.4.4 which has moved the problem on. We now get
>
> /usr/bin/ruby.exe -I
> "/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/lib:lib"
> "/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/cucumber" --color --
> tags
> ~@wip --strict --format pretty
> undefined local variable or method `capture_model' for main:Object
> (NameError)
> ./features/step_definitions/pickle_steps.rb:4
>
> It only happens on Windows - works fine on Mac


Can you try running Cucumber with the --backtrace switch? I don't
think this is in Cucumber - #capture_model sounds too Rails-specific -
I would guess it's one of your plugins. Anyway post the backtrace and
we'll take a look.

cheers,
Matt

http://mattwynne.net
+447974 430184

Ben Lovell

unread,
Nov 24, 2009, 12:19:17 PM11/24/09
to cu...@googlegroups.com
2009/11/24 Matt Wynne <ma...@mattwynne.net>
#capture_model is a pickle thing if I'm not mistaken. But yeah, backtrace might help ;)

Cheers,
Ben 

catalogs

unread,
Nov 24, 2009, 12:40:27 PM11/24/09
to Cukes
Hi thanks for the response

Here is the backtrace

$ cucumber --backtrace
undefined local variable or method `capture_model' for main:Object
(NameError)
./features/step_definitions/pickle_steps.rb:4
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
/usr/lib/ruby/gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in
`require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:158:in `require'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/
rb_support/rb_language.rb:124:in `load_code_file'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/
step_mother.rb:84:in `load_code_file'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/
step_mother.rb:76:in `load_code_files'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/
step_mother.rb:75:in `each'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/
step_mother.rb:75:in `load_code_files'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/cli/
main.rb:50:in `execute!'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/cli/
main.rb:24:in `execute'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/cucumber:8
/usr/bin/cucumber:19:in `load'
/usr/bin/cucumber:19
./features/support/hooks.rb:16: You have a nil object when you didn't
expect it! (NoMethodError)
The error occurred while evaluating nil.exit
from /usr/bin/cucumber:19


Peter

On Nov 24, 5:19 pm, Ben Lovell <benjamin.lov...@gmail.com> wrote:
> 2009/11/24 Matt Wynne <m...@mattwynne.net>

Matt Wynne

unread,
Nov 24, 2009, 2:34:11 PM11/24/09
to cu...@googlegroups.com

On 24 Nov 2009, at 17:40, catalogs wrote:

> Hi thanks for the response
>
> Here is the backtrace
>
> $ cucumber --backtrace
> undefined local variable or method `capture_model' for main:Object
> (NameError)
> ./features/step_definitions/pickle_steps.rb:4

So what's going on here at line 4?

Do you need to install the pickle gem on windows perchance?
> --
>
> You received this message because you are subscribed to the Google
> Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en

catalogs

unread,
Nov 24, 2009, 3:13:04 PM11/24/09
to Cukes
pickle (0.1.21) already installed - same version as on Mac - would
that it were so clear

Thanks
Peter
> > For more options, visit this group athttp://groups.google.com/group/cukes?hl=en

schlick

unread,
Nov 29, 2009, 2:19:48 PM11/29/09
to Cukes
Hi,

Check that you are requiring pickle in your cucumber env.rb file:

require 'pickle/world'

This is added by pickle when you run script/generate pickle. It is
overwritten whenever you run script/generate cucumber. For this latter
reason, the latest version of pickle now generates its own features/
support/pickle.rb file.

Cheers,

Michael.
Reply all
Reply to author
Forward
0 new messages