我可以毫无问题地在我的 Mac 上运行 bundle install,但是当我在我的 Ubuntu 构建服务器上运行它时,它会失败并显示以下输出:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/var/lib/jenkins/.rvm/rubies/ruby-1.9.3-p385-dev/bin/ruby extconf.rb
creating Makefile
make
compiling native.c
native.c: In function ‘birch_edge_initialize’:
native.c:42:8: warning: unused variable ‘direction’ [-Wunused-variable]
native.c:41:8: warning: unused variable ‘directed’ [-Wunused-variable]
native.c:40:8: warning: unused variable ‘node_b’ [-Wunused-variable]
native.c:39:8: warning: unused variable ‘node_a’ [-Wunused-variable]
native.c:58:1: warning: control reaches end of non-void function [-Wreturn-type]
linking shared-object birch/native.so
make install
/usr/bin/install -c -m 0755 native.so /var/lib/jenkins/jobs
/usr/bin/install -c -m 0755 native.so .
/usr/bin/install: 'native.so' and './native.so' are the same file
make: *** [-] Error 1
我正在使用 RVM,ruby 版本 ruby-1.9.3-p385-dev。
该问题也不是特定于一个 gem - 删除 birch 会导致带有本机扩展的 bson 出现相同类型的错误。