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

[31mF[0m[32m.[0m/home/jenkins/.rvm/gems/ext-jruby-1.7.19@sms/bundler/gems/capybara-webkit-259bcd9fd427/bin/webkit_server:
error while loading shared libraries: libQtWebKit.so.4: 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 

extconf.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
/opt/jruby-1.7.20/lib/native/include/ruby/ruby.h

extconf failed, uncaught signal 1

Gem files will remain installed in
/home/jenkins/.rvm/gems/ext-jruby-1.7.20@resquared/gems/capybara-webkit-1.5.1
for inspection.
Results logged to
/home/jenkins/.rvm/gems/ext-jruby-1.7.20@resquared/extensions/universal-java-1.7/1.9/capybara-webkit-1.5.1/gem_make.out
An error occurred while installing capybara-webkit (1.5.1), and Bundler
cannot
continue.
Make sure that gem install capybara-webkit -v '1.5.1' succeeds before
bundling.
Build step ‘Execute shell’ marked build as failure
Sending e-mails to: [email protected]
Finished: FAILURE