我们正在将Rails项目从2.3转换为5。
许多更改之一是启动消息:
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?当试图在我的JRuby 9.2.8.0安装中安装gem时,我得到:
checking for main() in -lkernel32... RuntimeError: The compiler failed to
generate an executable file.
You have to install development tools first.
...
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
M:/workspace/installations/jruby-9.2.8.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/wdm-0.1.1/mkmf.log该文件包含:
" -o conftest.exe -I/include/universal-java1.8 -IM:/workspace/installations/jruby-9.2.8.0/lib/ruby/include/ruby/backward -IM:/workspace/installations/jruby-9.2.8.0/lib/ruby/include -I. -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions conftest.c -L. -LM:/workspace/installations/jruby-9.2.8.0/lib -LM:/workspace/installations/jruby-9.2.8.0/lib/native/x86_64-Windows -m64 -march=native -mtune=native "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4: int main(int argc, char **argv)
5: {
6: return 0;
7: }
/* end */注意:我可以在ruby2.6.4p104 (2019-08-28修订版67798) x64-mingw32 32上安装gem罚款,但不能在我的JRuby安装中安装。
你知道如何安装这个宝石吗?
或者如果没有,我是否可以使用wdm的替代方案?我注意到我的资产在开发过程中没有正确地重新加载。
发布于 2019-10-25 08:11:45
第一个已经不再有意义了,因为JRuby现在确实支持C扩展。
这是一个简单的(不再是更长的)事实:C-扩展是在JRuby 1.6的实验上支持的,在1.7的时候,删除过程(它们从来没有工作得那么好)开始了,9.X不支持它们。如今,大多数本地宝石在JRuby上都有一个特定于Java的ext后端。
关联问题试图在使用JRuby时建立一个特定于JRuby的版本,不幸的是,它还没有完成/合并,但是您可以尝试修补程序。
您将需要在已禁用C-ext编译的修补程序中安装叉回购。或者您可以在JRuby上禁用gem (并处理应用程序中的“特定”后端代码):
gem 'wdm', '>= 0.1.0', platform: [:mri, :mswin]https://stackoverflow.com/questions/58458272
复制相似问题