top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Ruby connect to oracle failing

+1 vote
47 views

I have installed oracle intant client and test it it works fine. Now I wanna connect to oracle db. But got this
error
CUSTOM_REQUIRE.RB:36:IN `REQUIRE: CANNOT LOAD SUCH FILE -- OCI8 (LOADERROR)

my code is here.

require oci8
oci = OCI8.new(user,pass,ip:port/sid)
 oci.exec(select * from table) do |record|
  puts record.join(,)
end

Any clue?

posted Aug 29, 2013 by Sheetal Chauhan

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
Have u installed ruby-oci8 gem package
Yes I tried to install ruby-oci8 from source but it failed.

1 Answer

+1 vote

For installing that ruby-oci8 gem u need
1. instantclient-basic
2. instantclient-sdk
3. u need to export LD_LIBRARY_PATH of that path
4. then run bundle install

answer Aug 29, 2013 by Bob Wise
Similar Questions
+1 vote

My Ruby on Rails App needs to connect to a ODBC Datasource that has SSL only enabled.

Can somebody give me an example of connecting to a ODBC Source with SSL?

I constantly get SSL required error. I don't see the option of passing SSL Certificates via UnixODBC. May be something I am missing.

+1 vote

I'm wonder how most people securely connect to a Postgres database on a server separate from the app server.

The ActiveRecord docs for a MySQL connection have explicit SSL options, whereas with Postgres it seems one would pass SSL options as documented for libpq.

However a quick Googling returns SO threads with suggestions to use SSH tunnels. Which I guess could be managed with something like AutoSSH.

I'd love to hear from others. Is one method faster than the other, or easier to maintain?

+1 vote

I would like to know if this problem is occurs only with me? I was unable to get Mysql2 ou Sqlite3 working with Ruby and rails.

-ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
-Rails 4.0.0.

I tried several tutorials but no one work for me.

See same examples, for sqlite3:
https://github.com/luislavena/sqlite3-ruby/issues/82
http://stackoverflow.com/questions/15480381/how-do-i-install-sqlite3-for-ruby-on-windows

And many others.
I can install de gems but When a run the app it´s simple crash.


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...