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

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

having probem inserting data into db table
hi

i have a table with following columns in it
Code: candidate_id, degree, cgpa, institute

ScriptManager History and Opera Issue
I am having an issue in opera with the ScriptManager. I have a ScriptManager on a page with history

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