Read more

Gherkin: Error during installation

Andreas Robecke
March 05, 2012Software engineer

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
...
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

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.

Posted by Andreas Robecke to makandra dev (2012-03-05 13:47)