Capybara specs are failling with the below error

Hi All

capybara specs are failling with the below error

jruby version 1.7.19

redhat linux

error while loading shared libraries: cannot open
shared object file: No such file or directory

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/opt/jruby-1.7.20/bin/jruby -r ./siteconf20150515-9028-xyhv4b.rb 

/opt/jruby-1.7.20/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of
obsolete and deprecated Config.
mkmf.rb can’t find header files for ruby at

extconf failed, uncaught signal 1

Gem files will remain installed in
for inspection.
Results logged to
An error occurred while installing capybara-webkit (1.5.1), and Bundler
Make sure that gem install capybara-webkit -v '1.5.1' succeeds before
Build step ‘Execute shell’ marked build as failure
Sending e-mails to: [email protected]
Finished: FAILURE