Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

undefined method `each_pair' for 3:Fixnum (NoMethodError #76

Closed
nsinghonyx opened this issue Sep 14, 2010 · 8 comments
Closed

undefined method `each_pair' for 3:Fixnum (NoMethodError #76

nsinghonyx opened this issue Sep 14, 2010 · 8 comments

Comments

@nsinghonyx
Copy link

For more details regarding this error please see http://groups.google.com/group/cukes/browse_thread/thread/627caa1c473b6abc/ec838167abe90ad0?show_docid=ec838167abe90ad0#

@aslakhellesoy
Copy link
Contributor

It looks like ActiveSupport::Helper::TagHelper (which defines #tag) has been included at the Object level, overwriting Gherkin's internal #tag method.

It's definitely not the gherkin code that does this inclusion, so I'm going to assume it's your own code, Rails or possibly one of your gems/plugins that does this.

Happy bug hunting.

@petRUShka
Copy link

one more vote for this bug :)

@neerajsingh0101
Copy link

This is not a bug with cucumber. You will get this error if you are including ActiveSupport::Helper::TagHelper in controller or in model .

@petRUShka
Copy link

And what should I do?

@neerajsingh0101
Copy link

Look into your code base including plugins if anywhere you are including ActiveSupport::Helper::TagHelper. Note that ActiveSupport::Helper::TagHelper is also used by other modules like ActionView helpers. So first step would be to remove any ActionView component from controller or model.

@petRUShka
Copy link

Thank you! But do solution exist in case I needed to use ActiveSupport::Helper::TagHelper in controller?

@aslakhellesoy
Copy link
Contributor

I'm closing this bug, since it's not a gherkin bug. See my first comment.
@neerajdotname: I don't see why including ActiveSupport::Helper::TagHelper in a model or controller would cause this. It would have to be included in Object in order to overwrite #tag in gherkin. (Object is the common ancestor in the class hierarchy).

Find the code that includes TagHelper in Object and get rid of it.

@petRUShka
Copy link

Yes, you are right. Reason is including TagHelper right in Object (outside class definition). Thanks!

brauliobo referenced this issue in coletivoEITA/noosfero-ecosol May 16, 2014
This include was causing cucumber to crash because it was overwriting
the "tag" method on top-level, causing gherkin to jump awkwardly to
action_view. More information about this problem here:
cucumber/gherkin#76
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants