-
Notifications
You must be signed in to change notification settings - Fork 220
Random lexing error; native fallback fails #245
Comments
I ran into the exact same issue. We had random / non deterministic lexing errors and when trying to force usage of the ruby lexer, there was no English lexer to be found. Solution: You need to compile the lexer yourself. The problem for me was that initially I didn't have ragel installed on my system, which is why compiling didn't work at first. So before trying to follow my steps, ensure that
Now for compiling your own lexer:
|
This indeed solves the lexing errors! Thanks a lot for the hints. A plea to the gherkin people: this procedure complicates our CI setup considerably and I would appreciate it if I could remove it again. Would it be possible make gherkin work in plain ruby mode without those steps? |
Here is a script that allows you to automate those steps for your CI: https://github.com/b4mboo/grulec |
I'll try to make this easier in the next release. |
Any news on this? It seems a pretty critical bug as it makes cucumber entirely unreliable. |
i had this too, with mac 10.8.5, ruby 2.0.0p195 and cucumber gem 1.1.4. on some runs i would get the lexing error, on others not - with no change in the file or anything else. very frustrating. the involved files have a @ tag before the feature definition: @routing @726 after upgrading the gem to 1.3.8 i haven't seen it.. yet. |
Thank you, turned out that I didn't have ragel installed, though seems strange that the compiler wouldn't abort at that point if it seems to be very much so required. Installed ragel, uninstalled and reinstalled gherkin and it seems to be working fine now. |
@jcwilk Could you tell me how I can install ragel on windows 7? |
@caseyding I tend to avoid using ruby in windows whenever possible (I run a linux VM in windows) and my issue was in ubuntu, so I can't really help there or say whether it might be the same issue as I don't want to just make a guess and lead you down the wrong road. It sounds like if you have cucumber/gherkin on recent versions the issue probably isn't still present by now since this was two years ago? If you suspect it is, you might want to tag some of the others who actually know what they're doing here :P But I suspect it's something else unless you absolutely have to use an old version (again, mostly guessing) |
Gherkin2 will soon be replaced by Gherkin3 and we don't plan to make any more Gherkin2 releases. |
I'm still facing this issue with cucumber 2.0.2, The scenario is falling randomly. Is there a way to use Gherkin3 with cucumber 2.0.2 ? |
@marciok If you are willing to use not yet released versions, you can follow the instructions in: cucumber/gherkin#257 (comment). |
Awesome @brasmusson, thanks! |
@brasmusson Thanks again! 🎉🎊 |
We get (more or less) random lexing errors like the following:
This is on C/MRI Ruby 1.9.3-p392, gherkin 2.11.6
I tried to fall back to the ruby lexer as suggested (e.g. in cucumber/gherkin#182), along the following:
Then we will get a 'no lexer found exception':
I am not concerned about the performance. Is there a way to make the native ruby lexer work?
The text was updated successfully, but these errors were encountered: