当我尝试使用bundle install运行我的Ruby代码时,我遇到了这个错误:Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
我尝试运行gem install kdtree
和gem install kdtree -v '0.3'
,但它也会抛出同样的错误。现在我无法运行我的Ruby代码。关于如何解决这个问题的任何想法。我在Windows机器上运行btw。这是完整的错误日志:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating kdtree-i386-mingw32.def
compiling kdtree.c
kdtree.c: In function 'kdtree_nearest0':
kdtree.c:221:13: error: expected identifier or '(' before ',' token
kdtree.c:237:14: error: expected expression before '=' token
kdtree.c:237:29: error: expected expression before '=' token
kdtree.c:239:14: error: expected expression before '=' token
kdtree.c:239:30: error: expected expression before '=' token
kdtree.c:241:34: error: expected expression before ',' token
kdtree.c:241:34: error: too few arguments to function 'kdtree_nearest0'
kdtree.c:217:13: note: declared here
kdtree.c:243:37: error: expected expression before ',' token
kdtree.c:243:37: error: too few arguments to function 'kdtree_nearest0'
kdtree.c:217:13: note: declared here
kdtree.c: In function 'kdtree_nearestk0':
kdtree.c:313:13: error: expected identifier or '(' before ',' token
kdtree.c:330:14: error: expected expression before '=' token
kdtree.c:330:29: error: expected expression before '=' token
kdtree.c:332:14: error: expected expression before '=' token
kdtree.c:332:30: error: expected expression before '=' token
kdtree.c:334:35: error: expected expression before ',' token
kdtree.c:334:35: error: too few arguments to function 'kdtree_nearestk0'
kdtree.c:309:13: note: declared here
kdtree.c:336:38: error: expected expression before ',' token
kdtree.c:336:38: error: too few arguments to function 'kdtree_nearestk0'
kdtree.c:309:13: note: declared here
kdtree.c: In function 'kdtree_persist':
kdtree.c:409:11: warning: unused variable 'str' [-Wunused-variable]
make: *** [kdtree.o] Error 1
make failed, exit code 2