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

05d9948ffac2a58b6747a8028c1061d6?d=identicon&s=25 Khirod Patra (khirodjruby)
on 2014-05-21 13:50
Hi,

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



LOG:
-------------------

khirod@khirod:~/build_8x$ jruby -Xcext.enabled=true -S gem install
pry-stack_explorer
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/RubyKernel.java:1084
   (root) at
/home/khirod/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
   (root) at extconf.rb:19


Gem files will remain installed in
/home/khirod/jruby-1.7.8/lib/ruby/gems/shared/gems/binding_of_caller-0.7.2
for inspection.
Results logged to
/home/khirod/jruby-1.7.8/lib/ruby/gems/shared/gems/binding_of_caller-0.7.2/ext/binding_of_caller/gem_make.out



Thanks
-Khirod
05d9948ffac2a58b6747a8028c1061d6?d=identicon&s=25 Khirod Patra (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.

-Khirod
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.