Gherkin: Error during installation

Updated . Posted . Visible to the public.

When trying to install the gherkin gem, you might encounter an error with the following lines:

ERROR:  Error installing gherkin:
	ERROR: Failed to build gem native extension.
...
checking for main() in -lc... yes
creating Makefile
...
cc1: all warnings being treated as errors
Makefile:150: recipe for target 'gherkin_lexer_ar.o' failed
make: *** [gherkin_lexer_ar.o] Error 1
...

If upgrading is not an option, configure build options for gherkin:

bundle config --local build.gherkin --with-cflags=-w

Your .bundle/config file should now look like this:

---
BUNDLE_BUILD__GHERKIN: "--with-cflags=-w"

You should now be able to install the gem with bundle install.

Make sure to commit and push .bundle/config so your fellow developers (and all the servers you will deploy to) will benefit from this setting.

Last edit
Dominik Schöler
License
Source code in this card is licensed under the MIT License.
Posted to makandra dev (2012-03-05 12:47)