Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Erik Hollensbe
RE: not able to connect ruby 1.8.7 with mysql 5.1 [ reply ]  
2010-03-26 12:02
Note that you will need to remove the DBDs as well, which will be in a separate path (inside the load path, but not in the 'dbi' directory).

By: Erik Hollensbe
RE: not able to connect ruby 1.8.7 with mysql 5.1 [ reply ]  
2010-03-26 12:01
In short:

What happens here is pretty simple. The one-click installs a copy of DBI in the standard load path, and the gem installs via rubygems.

Unfortunately, the load path always wins in this regard; installing DBI via gems or even over 0.1.1 will not work.

There is a script that comes with the gem, called 'test_broken_dbi' that is built just to detect this scenario; it should help you when you follow the upcoming directions.

What you need to do is locate the old (0.1.1) version of DBI in your load path, remove it, and install the gem. At that point, 'test_broken_dbi' should report no problems.

Unfortunately, every attempt I've made in the past to get this extricated BEFORE it gets to the users has fallen on deaf ears, so this is the best I can do. I apologize that it has become such an issue for you.

By: anil kumar
RE: not able to connect ruby 1.8.7 with mysql 5.1 [ reply ]  
2010-03-26 06:05
Hi Erik,
initially i was using the latest version of DBI(0.4.3), which also failed so i used 0.1.1 hoping it to work.!
Anywaz..upgrading dbi to 0.4.3 + require 'rubygems'+ reinstall of libmysql.dll fixed the problem ..now its connecting and returning the results as well.

One query Eric, A/c to you what should we prefer manual install of ruby or one click installer of ruby ?

By: Erik Hollensbe
RE: not able to connect ruby 1.8.7 with mysql 5.1 [ reply ]  
2010-03-25 11:55
DBI 0.1.1 is close to 8 years old. Please upgrade with rubygems and remove the old version of DBI.

By: anil kumar
not able to connect ruby 1.8.7 with mysql 5.1 [ reply ]  
2010-03-25 11:42
got ruby-dbi configured and installed on windows xp.
ruby dbi version is dbi-0.1.1.
require 'dbi' on irb returns true, still on executing a pmg..it gives following errors:
C:/Ruby_Install/lib/ruby/site_ruby/1.8/dbi.rb:344:in `load_driver': Could not load driver (no such file to load -- mysql) (DBI::InterfaceError)
from C:/Ruby_Install/lib/ruby/site_ruby/1.8/dbi.rb:227:in `_get_full_driver'
from C:/Ruby_Install/lib/ruby/site_ruby/1.8/dbi.rb:213:in `connect'