I try to put this simple MRI script to work in jRuby but i get the error below. I installed the same gem as in my MRI I don't wanna use JDBC of Active Record, just make a simple connection and query, what should i do ?
C:\jruby-1.7.4\bin>jruby -S gem list --local
gives
..
ruby-oci8 (2.1.0 x86-mingw32)
..
the script
require 'oci8'
$conn = OCI8.new('test','test','dbcm.cm_121')
sql = %q{
select * from table
}
$conn.exec(sql).fetch_hash do |r|
r.each {|key, value| puts "#{key} is #{value}"}
puts ""
end
$conn.logoff
the error
C:\jruby-1.7.4\test>jruby fetch_sql.rb
LoadError: no such file to load -- oci8lib_jruby191
require at org/jruby/RubyKernel.java:1054
require at C:/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at C:/jruby-1.7.4/lib/ruby/gems/shared/gems/ruby-oci8-2.1.0-x86-mingw32/lib/oci8.rb:43
require at org/jruby/RubyKernel.java:1054
(root) at C:/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:1
(root) at fetch_sql.rb:1