Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:


Posted on 16th Feb 2014 07:03 pm by admin

Hi All,

I am trying to connect to the database server from the client server using ruby and facing the following issue-

$ruby -r oci8 -e "OCI8.new('temp','temp','//host:1521/sid').exec('select count(1) from rules'){|r| puts r.join}"

env.c:257:in oci8lib.so: ORA-12154: TNS:could not resolve the connect identifier specified (OCIError)
from /export/home/nikira/local//lib/ruby/site_ruby/1.8/oci8.rb:228:in `initialize'
from -e:1:in `new'
from -e:1
when i try the connection using simple sql command line, it's working fine

sqlplus 'temp/temp@tns_alias' --- connecting to the database.
I nerver used ruby, anyone please advice me on this?
Thanks
Abhinav

No comments posted yet

Your Answer:

Login to answer
231 Like 51 Dislike
Previous forums Next forums
Other forums

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe

Upload file and add HTML
Hey everyone,

I have a client has meeting agendas and minutes that should be posted online. I

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Delete Client 066 Earlywatch
Hi all,

in former times client earlywatch was required for SAPs remote access to SAP inst

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

Getting the full city list from maxminds geoip database
I am suprised I can't find any references to this.

I have maxminds geoip lite installed and i

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from th

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash