Non English language in Gherkin/Cucumber not recognized

(Support request #81145)
I have problems with support for non-english language Cucumber / Gherkin scenarios in Ruby Mine 7.0.4 for OSX.
For example highlighting, jump to declaration and auto complete works for English, but not always for Swedish. (Making RubyMine feel more like just a fancy text editor).

I believe it is related to versions of Cucumber 2.1 vs 2.0.2 and the required gems.
My best guess is the issue is related to their usage of Gherkin3 vs Gherkin (2.X).
Executing the Swedish scenarios from OSX terminal works with either version, so I guess the problem is in RubyMine.

Things that make this interesting:

  • When starting a new project it works OK without any gemfile (Both Cucumber 2.1 and 2.0.2 are installed on the system, so should default to newest?)
  • In a new project it works OK with Cucumber 2.0.2 as the only requirement in gemfile
    • Does not work with Cucumber 2.1 after updating the gemfile
    • After downgrading Cucumber to 2.0.2 it works OK again.

  • Does not work with Cucumber 2.1 for me in a big multi developer project using its Gemfile. With or without the versioned Gemfile.lock. (Both are attached. Cucumber 2.1 is used, recently upgraded from 2.0.2)
    • But does work for other coworkers. (A detail is I downgraded from RubyMine 8.0 to 7.1.4 to 7.0.4, they probably did not upgrade from RubyMine 7.0.4)
    • But does not work with Cucumber 2.0.2 when downgrading the Gemfile, (and updating bundle to renew Gemfile.lock) or even completely removing the Gemfile.lock
      [UPDATE: Going back to this I am confused by that I wrote not working, wit 2.0.2 now it does work fine when downgrading and repoening project]

RubyMine version 7.0.4 (Since later versions still have other problems with Cucumber support.)
Mac OSX 10.11.1
ruby 2.1.0p0

Attached is a small Swedish feature file.

Any help with getting RubyMine to recognize my large library of Swedish features or tips on how to handle the gem versioning for this would be much appreciated!

# language en
Thank you!

# language sv


Comment actions Permalink

Hi Staffan,

I'm developer responsible for Cucumber support in RubyMine.

Unfortunatelly this issue is hard to reproduce. Could you provide a sample project as zip archive?

Also idea.log file could help. (\


Comment actions Permalink

Hello Andrey
Thank you for a very quick reply!

Attached are:

- Idea.logs
Latest entries are lots of closing and opening of test projects after changing Cucumber version as above. "Trinidad" is the real project.

A very simple project created when testing this issue. Swedish Gherkin support stopped working when changing the gemfile Cucumber version from 2.0.2 to 2.1.
I doubt the project itself is useful, but you might have something in the .idea folder.

- Cucumber_2.1vs2.0.2.png
A fancy picture of the project above with different Cucumber versions in gemfile: the editor results and gemfile.lock dependencies.

- GemList.txt
A list of the local gems (Lower Cucumber versions installed only for troubleshooting this)

Comment actions Permalink

I tried to make a workaround by adding the Swedish terms to the English language definitions.

Swenglish was not the way to go for Cucumber 2.1, I found the standard English alternatives/synonyms used in Gherkin are not fully supported either.

Using Cucumber 2.1 and Gherkin3 3.1.2 my RubyMine do not recognize "Ability" or "Business need" as features

Defined in gherkin-languages.json in Gherkin3 lib:

| feature          | "Feature", "Business Need", "Ability" |

Adding a Swedish term to the list did not make it be recognized.

Using Cucumber 2.0.2 and Gherkin 2.12.2 my RubyMine recognizes "Ability" but not "Business need" as features

Defined in i18n.json in Gherkin lib:

"feature": "Feature|Business Need|Ability",

Adding a Swedish term to the list did make it be recognized.

Currently it seems I can use my original project with Cucumber downgraded to 2.0.2 and Swedish terms injected in the English ones.

Comment actions Permalink


I can't reproduce it, but found some probable bugs. Fixed them.

Could you try this custom build:

Comment actions Permalink

Hello Andrey
:x Thank you very much for your quick support. It even makes me forget my unwillingness to use emoticons. Today I took the opportunity to try this build.

 The syntax highlighting of Swedish keywords works fine with this build of RubyMine and Cucumber 2.1 (using Gherkin3)!

:( However plenty of steps are considered undefined, despite being available in my R.M. 7.0.4 or when running the tests.
From my colleagues I understand this is a general problem with RubyMine 7.1.4 and above.

Attached is a screenshot of both RubyMine versions running side by side. (In 7.0.4 file has not been reopened after switching to Cucumber 2.1, so syntax highlighting still displays OK.)
I see no obvious patterns of what steps are found, it includes steps in .rb files in subfolder in same directory as the feature file.

Also attached is the idea.log from this new build.

Comment actions Permalink

Could you try to invalidate caches? File -> Invalicate caches/restart

Comment actions Permalink

Sorry, no luck with flushed cache. Still most steps are regarded as undefined.
(Cucumber 2.0.2 and Gherkin 2.12, haven't tested Cucumber 2.1 and Gherkin3)

Comment actions Permalink

Where located step definition for the first three steps of the first scenario (in gem or in project file?)

Comment actions Permalink

All missing step definitions are located in the project. No steps are in gem files.
Usually the ruby file with the step is in a folder named step-definitions, which is located in the same folder as the .feature file.

group1 / location1 / spela_maltipset.feature
group1 / location1 / step-definitions / maltipset.rb


Now I see that in the picture attached
all steps that were found are located elsewhere: not in a subfolder directly by the feature file.

group1 / location1 / spela_maltipset.feature
group2 / step-definitions / common_stepthingies.rb

(However the reverse is not true: all steps that are located elsewhere in this fashion are not found.)

Comment actions Permalink


The problem with Ruby Mine not recognizing feature files in other languages than english for Gherkin3 remains. It pops up for other colleagues as well.

Is there any progress with general cucumber support and this issue for newer versions of RubyMine?
Can I provide any new input to help?


Your fancy new forum got rid of all the pictures. I attach a new one for inspiration.

Best wishes


Please sign in to leave a comment.