[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem in accessing MySQL

Bhaskar Ms

5/27/2009 9:16:00 AM

Hi,
I'm new to ruby and facing the following problem in connecting to MySQL
from my script.

Here is the script:
#!/usr/bin/ruby -w
#~ # simple.rb - simple MySQL script using Ruby DBI module
gem "mysql"
gem "dbi"
require "dbi"
#~ gem 'dbd-mysql'
begin
# connect to the MySQL server
dbh=DBI.connect("DBI:Mysql:<db-name>:<remote-Host>", "user",
"password")

# get server version string and display it
row = dbh.select_one("SELECT VERSION()")
puts "Server version: " + row[0]
rescue DBI::DatabaseError => e
puts "An error occurred"
puts "Error code: #{e.err}"
puts "Error message: #{e.errstr}"
ensure
# disconnect from server
dbh.disconnect if dbh
end


Here is the error:
>ruby simple.rb
c:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:294:in
`load_driver': Unable to load driver 'Mysql' (underlying error:
uninitialized constant DBI::DBD::Mysql) (DBI::InterfaceError)
from c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from c:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:236:in
`load_driver'
from c:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:154:in
`_get_full_driver'
from c:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:139:in
`connect'
from simple.rb:10
>Exit code: 1
--
Posted via http://www.ruby-....

6 Answers

SKD

11/26/2008 7:35:00 AM

0

graffiti removed

David Deilley

11/27/2008 5:11:00 AM

0

On Nov 26, 9:09 pm, Moslem cartoon character mohammed was a paedophile
6th century warlord and goat fucker who cooked up a false religion in
order to supplement brutality as a means of bringing people under
subjection <shumbawumba@.mailinator.com> wrote:
> Moslem cartoon character mohammed was a paedophile 6th century warlord
> and goat fucker who cooked up a false religion in order to supplement
> brutality as a means of bringing people under subjection wrote:> CNN - Helping child brides break free - "When I got married I was
> > scared," remembers 10-year-old Nujood Ali. "I didn't want to leave my
> > family and siblings." -  At an age when girls in the West still play
> > with dolls, Nujood found herself married to a man three times her age.
> > But in her home country of Yemen -- a deeply conservative Middle East
> > Muslim nation -- this situation isn't uncommon.,,Yemeni lawyer Shada
> > Nasser had long opposed the practice of early marriage when, in April
> > 2008, she got a chance to do something about it.  -
> >http://edition.cnn.com/2008/WORLD/meast/09/26/heroes.shada.......
>
> moslem cartoon character mohammad and his bumchum allaah were child
> molesting goat fuckers and nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
>                      \             (
>                        \            >
> Up your ass mohammad  - Elif air ab tizak!!!
>
> i...@muslimmatch.com  or apa...@muslimmatch.com or
> politicsIranian@googlegroups.com
> Achmat.Samsod...@gmail.com
> fa...@telkomsa.net
> jam...@islamsa.org.za
> ds...@mweb.co.za
> jamia...@lantic.co.za
> sanha-...@sanha.org.za
> sanha...@sanha.org.za
> sanha-...@sanha.org.za
> helpl...@sanha.org.za
> arah1...@gmail.com
> islamwayoflife@googlegroups.com
> furtivo4...@gmail.com
> ipc...@yebo.co.za
>
> ** Posted fromhttp://www.te...** moslem cartoon character
> mohammad and his bumchum allaah were child molesting goat fuckers and
> nikomaks
>
>                                 _
>                               /'_/)
>                             ,/_  /
>                            /    /
>                      /'_'/'   '/'__'7,
>                   /'/    /    /    /" /_>                  ('(    ' /'   ')
>                   \      /
>                    '\'              _.7'
> ...
>
> read more »

David Deilley

11/27/2008 6:35:00 AM

0

On Nov 26, 9:55 pm, Moslem cartoon character mohammed was a paedophile
6th century warlord and goat fucker who cooked up a false religion in
order to supplement brutality as a means of bringing people under
subjection <shumbawumba@.mailinator.com> wrote:
> Moslem cartoon character mohammed was a paedophile 6th century warlord
> and goat fucker who cooked up a false religion in order to supplement
> brutality as a means of bringing people under subjection wrote:
>
>
>
> > Moslem cartoon character mohammed was a paedophile 6th century warlord
> > and goat fucker who cooked up a false religion in order to supplement
> > brutality as a means of bringing people under subjection wrote:
> >> CNN - Helping child brides break free - "When I got married I was
> >> scared," remembers 10-year-old Nujood Ali. "I didn't want to leave my
> >> family and siblings." -  At an age when girls in the West still play
> >> with dolls, Nujood found herself married to a man three times her age.
> >> But in her home country of Yemen -- a deeply conservative Middle East
> >> Muslim nation -- this situation isn't uncommon.,,Yemeni lawyer Shada
> >> Nasser had long opposed the practice of early marriage when, in April
> >> 2008, she got a chance to do something about it.  -
> >>http://edition.cnn.com/2008/WORLD/meast/09/26/heroes.shada.......
>
> > moslem cartoon character mohammad and his bumchum allaah were child
> > molesting goat fuckers and nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
> > fa...@telkomsa.net
> > jam...@islamsa.org.za
> > ds...@mweb.co.za
> > jamia...@lantic.co.za
> > sanha-...@sanha.org.za
> > sanha...@sanha.org.za
> > sanha-...@sanha.org.za
> > helpl...@sanha.org.za
> > arah1...@gmail.com
> > islamwayoflife@googlegroups.com
> > furtivo4...@gmail.com
> > ipc...@yebo.co.za
>
> > ** Posted fromhttp://www.te...** moslem cartoon character
> > mohammad and his bumchum allaah were child molesting goat fuckers and
> > nikomaks
>
> >                                _
> >                              /'_/)
> >                            ,/_  /
> >                           /    /
> >                     /'_'/'   '/'__'7,
> >                  /'/    /    /    /" /_> >                 ('(    ' /'   ')
> >                  \      /
> >                   '\'              _.7'
> >                     \             (
> >                       \            >
> > Up your ass mohammad  - Elif air ab tizak!!!
>
> > i...@muslimmatch.com  or apa...@muslimmatch.com or
> > politicsIranian@googlegroups.com
> > Achmat.Samsod...@gmail.com
>
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

David Deilley

11/27/2008 8:26:00 PM

0

THAT'S better!al

SKD

11/28/2008 8:40:00 AM

0

done

David Deilley

12/1/2008 8:37:00 PM

0

On Dec 1, 12:31 pm, Moslem cartoon character mohammed was a paedophile
6th century warlord and goat fucker who cooked up a false religion in
order to supplement brutality as a means of bringing people under
subjection <goat_fucking_mohammadan@.yahoo.com> wrote:
> Moslem cartoon character mohammed was a paedophile 6th century warlord