JRuby/Windows and (native) extensions how do I distinguish them?

人盡茶涼 提交于 2019-12-06 00:42:59

there is no really easy way to use native extensions in jruby. native extensions are calling c code that cant be called in jruby without implementing it in java. aside from that a few extensions are seeing jruby ports, for example EventMachine that you mentioned.

and as far as i know the only way to see if you can use a gem/extension with jruby is to read the docs, try it or read the source

VonC

JRuby does not support native extensions, unfortunately, because they depend on specific memory and runtime details specific to the C implementation.
Usually you can find an equivalent library on the JVM that will work well as a replacement...

To complete LDomagala's answer, you can also refer to this thread related to the same "native extension" issue

Some installation script may rely on RUBY_PLATFORM to determine whether to build the native extensions depending on your OS. If you are on windows it will not build them.

The other way to avoid native compilation is using the ENV var 'NORUBYEXT'.

But that still may involve some tweaking in the ruby installation script...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!