How to enable C extension support in jRuby?

后端 未结 2 1702
日久生厌
日久生厌 2020-12-05 18:47

I want to install a gem but I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing twitter-login:
               


        
相关标签:
2条回答
  • 2020-12-05 19:23

    .jrubyrc edits suggested by Rodrigo didn't work for me (jdk 7u25 / JRuby 1.7.4), but exporting the JRUBY_OPTS did do the trick:

    export JRUBY_OPTS="--1.9 -Xcext.enabled=true"
    
    0 讨论(0)
  • 2020-12-05 19:39

    Make sure you are using the latest openjdk (7 update 21, at the time of this writing) and latest JRuby (1.7.4).

    Create a file called .jrubyrc in your user home folder.

    add the following;

    cext.enabled=true
    

    done

    0 讨论(0)
提交回复
热议问题