Take Ruby out of the picture to make sure it is not your Oracle client.

Run sqlplus to ensure that you are connecting properly and the path is
well-defined.

On Wed, Jul 22, 2009 at 7:23 AM, Dheeraj Gambhir <
checktestingthi...@gmail.com> wrote:

> I have upgraded to 2.0.2 by using
> http://rubyforge.org/frs/download.php/56929/ruby-*oci8*-1.0.6-x86-mswin...<http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem>.
> and then:
>
> C:\ruby>gem install ruby-oci8-2.0.2-x86-mswin32-60.gem
> Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
> 1 gem installed
> Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
> Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...
>
> but still it throws OCI Library Initialization
> Error (OCIError)
>
> Thnx
> D G
>
>
> On Wed, Jul 22, 2009 at 5:42 PM, srinivas subramanian <
> winningsau...@gmail.com> wrote:
>
>> Hi Dhiraj,
>>
>> As per your previous mail, you are having an older version of oci8 i.e
>> 1.0.6.Pls upgrade it to 2.0.2 & try.
>>
>> Srinivas
>>
>>
>> On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir <
>> checktestingthi...@gmail.com> wrote:
>>
>>> Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32
>>> is installed properly.
>>>
>>>
>>> On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian <
>>> winningsau...@gmail.com> wrote:
>>>
>>>> It works for me :). Check the version of ruby-oci8 that you are using.
>>>> My ruby-oci8 version is 2.0.2. May be its not installed properly. Just 
>>>> check
>>>> on irb by doing a require 'oci8'. If it returns true then its installed
>>>> properly else its not.
>>>>
>>>> Srinivas.
>>>>
>>>>
>>>> On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir <
>>>> checktestingthi...@gmail.com> wrote:
>>>>
>>>>>
>>>>> No fruit, still the same issue. (attached is the shot for the same)
>>>>>
>>>>> Regards
>>>>> Dheeraj Gambhir
>>>>>
>>>>>
>>>>> On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian <
>>>>> winningsau...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>> Try the following :
>>>>>>
>>>>>> require 'oci8'
>>>>>> OCI8.new("mlbread", "mlbread", "Test").exec('select * from
>>>>>> bam_order.ec_invoice where order_id = 139920') do |r|
>>>>>> puts r.join(',')
>>>>>> end
>>>>>>
>>>>>> Srinivas
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir <
>>>>>> checktestingthi...@gmail.com> wrote:
>>>>>>
>>>>>>> Sir,
>>>>>>>
>>>>>>> My code is:
>>>>>>> require 'oci8'
>>>>>>> OCI8.new('mlbread', 'mlbread', '
>>>>>>> 172.16.100.110:1521/Test').exec('select<http://172.16.100.110:1521/Test%27%29.exec%28%27select>*
>>>>>>>  from bam_order.ec_invoice where order_id = 139920') do |r|
>>>>>>> puts r.join(',')
>>>>>>> end
>>>>>>>
>>>>>>>
>>>>>>> My TNS Entry is:
>>>>>>> Test =
>>>>>>>   (DESCRIPTION =
>>>>>>>     (ADDRESS_LIST =
>>>>>>>       (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT =
>>>>>>> 1521))
>>>>>>>     )
>>>>>>>     (CONNECT_DATA =
>>>>>>>       (SID = mlbd)
>>>>>>>       (SERVER = DEDICATED)
>>>>>>>     )
>>>>>>>   )
>>>>>>>
>>>>>>> But i m still getting this error:
>>>>>>> C:\testwatir>ruby testcon.rb
>>>>>>> c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
>>>>>>> Initialization
>>>>>>> Error (OCIError)
>>>>>>>         from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
>>>>>>>         from
>>>>>>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
>>>>>>> m_original_require'
>>>>>>>         from
>>>>>>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
>>>>>>> quire'
>>>>>>>         from testcon.rb:1
>>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>> D G
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian <
>>>>>>> winningsau...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Dheeraj,
>>>>>>>>
>>>>>>>> Check the entry in your tnsnames.ora file. It should be something
>>>>>>>> like this :
>>>>>>>>
>>>>>>>> *SOMENAME* =
>>>>>>>> (DESCRIPTION =
>>>>>>>>     (ADDRESS_LIST =
>>>>>>>>       (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
>>>>>>>>     )
>>>>>>>>     (CONNECT_DATA =
>>>>>>>>       (SERVICE_NAME = someDBName)
>>>>>>>>     )
>>>>>>>>   )
>>>>>>>>
>>>>>>>>
>>>>>>>> Now, just enter the *SOMENAME *as in your tnsname.ora file in your
>>>>>>>> connection string & try:
>>>>>>>>
>>>>>>>> require 'oci8'
>>>>>>>> OCI8.new("UserName","Password","*SOMENAME*").exec(....some
>>>>>>>> query...)
>>>>>>>>
>>>>>>>> Let me know if you face any issues.
>>>>>>>>
>>>>>>>> Srinivas.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir <
>>>>>>>> checktestingthi...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Any help/solution?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir <
>>>>>>>>> checktestingthi...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Tony,
>>>>>>>>>>
>>>>>>>>>> I tried one again that u mentioned here but i am still getting :
>>>>>>>>>> C:\testwatir>ruby testcon.rb
>>>>>>>>>> c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
>>>>>>>>>> Initialization
>>>>>>>>>> Error (OCIError)
>>>>>>>>>>         from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
>>>>>>>>>>         from
>>>>>>>>>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
>>>>>>>>>> m_original_require'
>>>>>>>>>>         from
>>>>>>>>>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
>>>>>>>>>> quire'
>>>>>>>>>>         from testcon.rb:1
>>>>>>>>>>
>>>>>>>>>> Refer to attached screen shot having code and error back to back.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> D G
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Jul 22, 2009 at 1:00 PM, Tony <ynot...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Hi Dheeraj,
>>>>>>>>>>>
>>>>>>>>>>> Had never connected to oracle db.
>>>>>>>>>>> Did the below and was able to connect to the db.
>>>>>>>>>>> 1. Downloaded ruby-oci from
>>>>>>>>>>> http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
>>>>>>>>>>> .
>>>>>>>>>>> This downloads as tar file.
>>>>>>>>>>> 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar
>>>>>>>>>>> to
>>>>>>>>>>> ruby-oci8-1.0.6-x86-mswin32-60.gem
>>>>>>>>>>> 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
>>>>>>>>>>> 4. Downloaded Oracle instant Basic client (45mb) from
>>>>>>>>>>>
>>>>>>>>>>> http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
>>>>>>>>>>> 5. Extract it to C:\Oracle\instantclient_11_1
>>>>>>>>>>> 6. Added "C:\Oracle\instantclient_11_1" to the path variable.
>>>>>>>>>>>
>>>>>>>>>>> dbtest.rb
>>>>>>>>>>> require 'oci8'
>>>>>>>>>>> OCI8.new('<username>', '<password>',
>>>>>>>>>>> '<hostname>:<port>/<SID>').exec
>>>>>>>>>>> ('select * from temp_cancel_subs') do |r|
>>>>>>>>>>>  puts r.join(',')
>>>>>>>>>>> end
>>>>>>>>>>>
>>>>>>>>>>> This worked for me. I had to connect to oracle 10g
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Tony
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to