Forum: JRuby C extension support is not enabled. [pry-stack_explorer]

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
9c88c458f1c870f70cc923bc9afa6a39?d=identicon&s=25 Khirod P. (khirodjruby)
on 2014-05-21 13:50

I am Facing the below issue when installing the gem pry-stack_explorer
through jruby. also tried with -Xcext.enabled=true , but same issue.
Please help.

JRUBY Version : jruby-1.7.8


khirod@khirod:~/build_8x$ jruby -Xcext.enabled=true -S gem install
Building native extensions.  This could take a while...
ERROR:  Error installing pry-stack_explorer:
  ERROR: Failed to build gem native extension.

    /home/khirod/jruby-1.7.8/bin/jruby extconf.rb
NotImplementedError: C extension support is not enabled. Pass
-Xcext.enabled=true to JRuby or set JRUBY_OPTS.

   (root) at /home/khirod/jruby-1.7.8/lib/ruby/shared/mkmf.rb:8
  require at org/jruby/
   (root) at
   (root) at extconf.rb:19

Gem files will remain installed in
for inspection.
Results logged to

9c88c458f1c870f70cc923bc9afa6a39?d=identicon&s=25 Khirod P. (khirodjruby)
on 2014-05-29 10:50
Work around:

I have follow the below work around of my own, not sure it should be
recommended. but I can install the gem and it works fine for me.

1) create a directory structure $JRUBY_HOME/lib/native/include

export JRUBY_OPTS=-Xcext.enabled=true

2) installed ruby-19 locally , just to take the *.h files.

3) create a soft link from $JRUBY_HOME/lib/native/include . i.e.

ln -s /home/khirod/ruby_19/include/ruby-1.9.1/ruby ruby

4) jruby -S gem install pry-nav
5) jruby -S gem install pry-stack_explorer

Now I can use the debug syntax of pry-stack_explorer.

Please suggests if anybody have any better tricks and idea.

This topic is locked and can not be replied to.