Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 安装FFI Gem-[-Werror,-Wimplicit函数声明]时出错_Ruby On Rails_Ruby_Rubygems - Fatal编程技术网

Ruby on rails 安装FFI Gem-[-Werror,-Wimplicit函数声明]时出错

Ruby on rails 安装FFI Gem-[-Werror,-Wimplicit函数声明]时出错,ruby-on-rails,ruby,rubygems,Ruby On Rails,Ruby,Rubygems,具体而言,错误如下所示: Function.c:563:9: error: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Werror,-Wimplicit-function-declaration] rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);

具体而言,错误如下所示:

Function.c:563:9: error: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in
C99 [-Werror,-Wimplicit-function-declaration]
        rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);
        ^
Function.c:563:9: note: did you mean 'rb_thread_call_with_gvl'?
Function.c:102:14: note: 'rb_thread_call_with_gvl' declared here
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
             ^
Function.c:948:17: warning: 'ffi_prep_closure' is deprecated [-Wdeprecated-declarations]
    ffiStatus = ffi_prep_closure(code, &fnInfo->ffi_cif, callback_invoke, closure);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi/ffi.h:350:18: note:
'ffi_prep_closure' has been explicitly marked deprecated here
  __attribute__((deprecated))
我一直在尝试使用Ruby 2.3.6安装旧版本的FFI v'1.9.18。

找到了解决方案:
gem安装ffi-v'1.9.18'--with cflags=“-Wno error=隐式函数声明”

从中获得解决方案: