You need to tell Bundle to pass the "ignore warning as error" parameter to the GEM. To do this, execute the following command before calling bundle install
:
bundle config build.gherkin --with-cflags=-w
If that won't work, try this:
bundle config gherkin --with-cflags=-w
Reading this two SO entries helped me solve the problem:
Troubleshooting installing Gherkin 2.1.5
How can I pass a parameter for gem installation when I run bundle install?