Kyle
7/11/2008 4:10:00 PM
False hope. If I fire up irb, require 'dbi', and then try to load a
mysql connection, I get the same error:
> mysql =3D DBI.connect('dbi:Mysql:.....')
DBI::InterfaceError: Unable to load driver 'Mysql'
=2E..
If I "require 'mysql'", I get "true". If I then try to load a mysql
connection, I get this interesting error:
> require 'mysql'
true
> mysql =3D DBI.connect('dbi:Mysql:.....')
DBI::InterfaceError: Could not load driver (uninitialized constant
Mysql:Driver)
from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:344:in
'load_driver'
from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:227:in
'_get_full_driver'
from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:213:in
'connect'
Any other thoughts? I'm sorry to bombard the list like this...
-Kyle
On Jul 11, 10:55=A0am, Kyle <kyle.r...@gmail.com> wrote:
> Update: the 64/32 threw me a bit. =A0I installed the 32-bit MySQL, and
> at least now, I'm getting "require 'mysql'" to return "true".
>
> Sorry about that. =A0I'll see how it goes from here and let you know.
>
> -Kyle
>
> On Jul 11, 10:48=A0am, Kyle <kyle.r...@gmail.com> wrote:
>
> > Thank you for your tips. =A0I'd rather not install Rails if possible -
> > I'd have to re-write my scripts to use ActiveRecord, and from what I
> > hear, it's not necessarily easy to get Rails to talk to
> > MSSQL2005Express anyway...but I'll certainly give it a shot if nothing
> > else works!
>
> > I installed the MySQL Essentials and am getting the following errors:
>
> > > require 'mysql'
>
> > LoadError: 193: %1 is not a valid Win32 application. =A0 =3D C:/Program
> > Files/Ruby/lib/ruby/gems/1.8/gems/mysql-2.7.3-mswin32/ext/mysql.so
> > =A0 =A0 =A0 =A0 from C:/Program Files/Ruby/lib/ruby/gems/1.8/gems/mysql=
-2.7.3-mswin32/
> > ext/mysql.so
> > =A0 =A0 =A0 =A0 from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubyg=
ems/
> > custom_requirement.rb:32:in 'require'
>
> > > mysql =3D DBI.connect('dbi:Mysql:.....')
>
> > DBI::InterfaceError: Unable to load driver 'Mysql'
> > =A0 =A0 =A0 =A0 from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/dbi.r=
b:329:in
> > 'load_driver'
> > =A0 =A0 =A0 =A0 from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/dbi.r=
b:227:in
> > '_get_full_driver'
> > =A0 =A0 =A0 =A0 from C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/dbi.r=
b:213:in
> > 'connect'
>
> > I hate to even think about this, but could this be an issue with Win
> > XP x64? =A0That's what this machine is running... =A0I also had problem=
s
> > on a Win32 machine, though, with MySQL already installed. =A0I double-
> > checked that the MySQL directory was in my PATH, too.
>
> > Any other ideas? =A0I hadn't anticipated it being so difficult to get
> > Ruby to talk to a MySQL database on Windows.
>
> > -Kyle
>
> > On Jul 11, 8:18=A0am, hemant <gethem...@gmail.com> wrote:
>
> > > On Fri, Jul 11, 2008 at 8:20 AM, Kyle <kyle.r...@gmail.com> wrote:
> > > > The short question: Has anybody successfully connected to both MS S=
QL
> > > > 2005 Express and MySQL databases using Ruby on Windows XP? =A0How?
>
> > > > The long description: My company's point-of-sale system uses MS SQL=