2012-08-30 29 views
7

Sto cercando di installare Gherkin 2.1.5, beh, in realtà è una dipendenza di https://github.com/opencongress/opencongress. Sto usando bundle install nella directory root del codice da installare, sono stati installati circa 20-30 pacchetti e ora sono bloccato su questo. Sono in esecuzione:Risoluzione dei problemi di installazione di Gherkin 2.1.5

Linux 3.2.0-27-generiC#43-Ubuntu SMP 
Linux Mint 13 Maya 

Ecco l'output una volta arrestata l'installazione.

---snip--(a bunch of usings) 
Installing gherkin (2.1.5) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.8 extconf.rb 
checking for main() in -lc... yes 
creating Makefile 

make 
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -O0 -Wall -Werror -c  gherkin_lexer_ar.c 
/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘CLexer_scan’: 
/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:198:29: error: the comparison will always evaluate as ‘true’ for the address of ‘raise_lexer_error’  will never be NULL [-Werror=address] 
/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:198:29: error: the comparison will always evaluate as ‘true’ for the address of ‘raise_lexer_error’  will never be NULL [-Werror=address] 
cc1: all warnings being treated as errors 
make: *** [gherkin_lexer_ar.o] Error 1 


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.5 for inspection. 
Results logged to /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.5/ext/gherkin_lexer_ar/gem_make.out 

non ho mai programmato in Ruby prima che quindi sono un po 'in contatto con l'intero processo di installazione delle cose. Avevo appena capito come ottenere il trucco da installare e pensavo di essere nel bene. Grazie per qualsiasi consiglio.

risposta

13

gem install gherkin -v '2.1.5' -- --with-cflags=-w

ha fatto il trucco per me.

+2

Questo ha funzionato, ma perché? Senza comprensione, siamo consegnati a consultare StackOverflow per sempre! – cmrichards

Problemi correlati