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

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:

[email protected]:~/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

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

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

  2. 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

  1. jruby -S gem install pry-nav
  2. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs