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

php title problem
Hi,

I am having a problem managing my page title with PHP.

Currently I have my <

Clean URLs
Hi I was wandering if anyone has ever implemented URLs on their PHP run website using URLS like wiki

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but

Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.

When I send

AUTONUMBER PROBLEM
Hello Everyone,

My name is Jones and i am new to this forum and to oracle. I am using ora

PHP friend keyword equivalent
is there a PHP equivalent for the C++ friend keyword?

PHP Cannot redeclare class
I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot rede

BSP Ext - tableView - Sort - NEWBIE
Hi,
I have been trying to get the sort to work. I have defined the column definitions by fillin

Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values

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