Rubymine Cucumber Windows 7 install Gherkin error

148 Views Asked by At

Just wondering if anyone has the above combination working on win 7 64 bit. I'm having issues running cucumber as I'm having problems with gherkin. I see on the github there are some issues with it on 64 bit machines I just couldn't get the fix to work from here

WARNING: cannot load such file -- 2.1/gherkin_lexer_en Couldn't load 2.1/gherkin_lexer_en

Has anyone got this going in Windows 7 64 bit.

ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32 Rails 4.2.1

1

There are 1 best solutions below

0
On

As answered in this question, this is the workaround:

After bundle install, remove the gherkin gem:

gem uninstall gherkin --force

Reinstall the gem (it may take a while):

gem install gherkin --platform ruby -v 2.12.2

Go to the folder of the gem inside your ruby installation directory. Something like this:

{ruby_dir}\lib\ruby\gems\2.1.0\gems\gherkin-2.12.2\lib\gherkin

And replace the lib/gherkin/c_lexer.rb line 7 with:

prefix = ''

This workaround is specified in https://github.com/cucumber/gherkin/issues/273 with the comment by mscharley on Jan 18, 2014.

I have to follow these steps after every bundle install on Windows OS. Tested with Windows 7 and Windows 10.