And you did gem install mysql?
On Wednesday, December 4, 2013 2:33:59 AM UTC-6, Bhavesh wrote:
>
> Hi,
>
>
>
> I have ruby 193 installed and have following gems on my machine :
>
>
>
> *** LOCAL GEMS ***
>
>
>
> archive-tar-minitar (0.5.2)
>
> bigdecimal (1.1.0)
>
> childprocess (0.3.9)
>
> columnize (0.3.6)
>
> commonwatir (4.0.0)
>
> dbd-mysql (0.4.4)
>
> dbi (0.4.5)
>
> deprecated (2.0.1)
>
> ffi (1.9.3 x86-mingw32)
>
> io-console (0.3)
>
> json (1.5.5)
>
> linecache19 (0.5.12)
>
> mini_magick (3.5.0)
>
> mini_portile (0.5.2)
>
> minitest (2.5.1)
>
> multi_json (1.8.2)
>
> mysql (2.9.1 x86-mingw32)
>
> needle (1.3.0)
>
> net-sftp (2.1.2)
>
> net-ssh (2.7.0)
>
> nokogiri (1.6.0 x86-mingw32)
>
> rake (0.9.2.2)
>
> rautomation (0.13.0)
>
> rbx-require-relative (0.0.9)
>
> rdoc (3.9.5)
>
> ruby_core_source (0.1.5)
>
> rubygems-update (2.1.11)
>
> rubyzip (1.0.0)
>
> selenium-webdriver (2.37.0)
>
> subexec (0.2.3)
>
> watir (5.0.0 x86-mingw32)
>
> watir-classic (4.0.1)
>
> watir-webdriver (0.6.4)
>
> websocket (1.0.7)
>
> win32-api (1.5.0 universal-mingw32)
>
> win32-process (0.7.4)
>
> win32screenshot (1.0.10)
>
> windows-api (0.4.2)
>
> windows-pr (1.2.2)
>
>
>
>
>
> I have two issue while using watir webdriver.
>
>
>
> 1. Im trying to connect to mysql, but it throws me error [I
> already have libmysql.dll from version 6.0.0] :
>
>
>
> Here is the my code in file sql.rb :
>
>
>
> class Kmysql
>
> require 'rubygems'
>
> require "mysql"
>
> #require 'ruby-debug'
>
>
>
> def connect_db
>
> begin
>
> @@host = "machine1"
>
> @@user = "something"
>
> @@password = "something"
>
> @@schema = "testplan"
>
> @@dbh = Mysql.real_connect(@@host,@@user,@@password,@@schema)
>
> rescue Mysql::Error => e
>
> puts "Error code: #{e.errno}"
>
> puts "Error Message: #{e.error}"
>
> puts "Error code: #{e.sqlstate}" if e.respond_to("sqlstate")
>
> end
>
> end
>
>
>
> Then I using like this in another file to create a session :
>
>
>
> require 'Lib/Common/sql'
>
> $db = Kmysql.new()
>
> $db.connect_db
>
>
>
> But im getting error as :
>
>
>
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
> `r
>
> equire': cannot load such file -- mysql/mysql_api (LoadError)
>
> from
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:55:in `require'
>
> from
> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.1-x86-mingw32/lib/mys
>
> ql.rb:6:in `rescue in <top (required)>'
>
> from
> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.1-x86-mingw32/lib/mys
>
> ql.rb:2:in `<top (required)>'
>
> from
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:135:in `require'
>
> from
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:135:in `rescue in require'
>
> from
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:144:in `require'
>
>
>
> So what im missing here?
>
>
>
>
>
> Second issue is about security certicate error, I want to bypass that ,
> but it is not possible.
>
>
>
> Is their any way I can bypass that.
>
>
>
> I don’t have valid certificate for website now, but I want to complete
> automation.
>
>
>
> With watir websriver, as soon as that warning comes, it just freezs and
> not even able to click on that wrning link “continue to website”.
>
>
>
> So what is the solution for IE8 which im usng now?
>
>
>
>
>
> Can someone help me with these 2 queries.
>
>
>
> Thanks
>
> Bhavesh
>
>
>
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.