-
Notifications
You must be signed in to change notification settings - Fork 50
Issue while installing birch #37
Description
Hi,
I am having trouble when building a docker container. I have a rails app and in the docker file, I use
FROM rails:onbuild.
But when I build the container, I get the following error:
`Installing birch 0.0.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/birch-0.0.8/ext/birch
/usr/local/bin/ruby -r ./siteconf20160204-7-z7y8lb.rb extconf.rb
creating Makefile
current directory: /usr/local/bundle/gems/birch-0.0.8/ext/birch
make "DESTDIR=" clean
current directory: /usr/local/bundle/gems/birch-0.0.8/ext/birch
make "DESTDIR="
compiling native.c
native.c: In function 'birch_edge_initialize':
native.c:42:8: warning: unused variable 'direction' [-Wunused-variable]
VALUE direction;
^
native.c:41:8: warning: unused variable 'directed' [-Wunused-variable]
VALUE directed;
^
native.c:40:8: warning: unused variable 'node_b' [-Wunused-variable]
VALUE node_b;
^
native.c:39:8: warning: unused variable 'node_a' [-Wunused-variable]
VALUE node_a;
^
native.c: In function 'birch_has_features':
native.c:272:3: warning: implicit declaration of function 'RHASH' [-Wimplicit-function-declaration]
if (!RHASH(features)->ntbl) {
^
native.c:272:23: error: invalid type argument of '->' (have 'int')
if (!RHASH(features)->ntbl) {
^
native.c: In function 'birch_edge_initialize':
native.c:58:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
native.c: In function 'birch_has_features':
native.c:275:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:237: recipe for target 'native.o' failed
make: *** [native.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/bundle/gems/birch-0.0.8 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux/2.2.0-static/birch-0.0.8/gem_make.out
`
I was able to solve is by using the contents of the dockerfile and changing ruby from 2.2 to 2.1.5
I understand its not your issue but informing you so it can help !