解决这个问题的步骤是:
1.下载 [url=http://www.vandomburg.net/files/mysql-ruby-windows-2.7.1.zip]mysql/ruby 2.7.1[/url]
2解压其中的mysql.so到%RUBYARCHDIR%目录下(例如:C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt)
3.MySQL/Ruby needs a DLL dependency satisfied in order to run. You can do this by either:
[list]------(Recommended) Including the MySQL bindir in your path (e.g. C:\Program Files\MySQL\MySQL Server 5.0\bin).[/list]
[list]------Copying libmysql.dll from your MySQL bindir or source package to your Ruby bindir (e.g. C:\ruby\bin).[/list]
[quote]Instant Rails users: You will find that the libmysql.dll from the included PHP distribution won’t work. Instead, grab a libmysql.dll from a real MySQL distribution. InstantRails 1.3a comes with MySQL 4.1.9, which you can download here
[/quote]
4.To verify, try to run the following code:
[code]
require 'mysql'
puts Mysql::VERSION[/code]
If it outputs 20700, then you’re all set up
1.下载 [url=http://www.vandomburg.net/files/mysql-ruby-windows-2.7.1.zip]mysql/ruby 2.7.1[/url]
2解压其中的mysql.so到%RUBYARCHDIR%目录下(例如:C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt)
3.MySQL/Ruby needs a DLL dependency satisfied in order to run. You can do this by either:
[list]------(Recommended) Including the MySQL bindir in your path (e.g. C:\Program Files\MySQL\MySQL Server 5.0\bin).[/list]
[list]------Copying libmysql.dll from your MySQL bindir or source package to your Ruby bindir (e.g. C:\ruby\bin).[/list]
[quote]Instant Rails users: You will find that the libmysql.dll from the included PHP distribution won’t work. Instead, grab a libmysql.dll from a real MySQL distribution. InstantRails 1.3a comes with MySQL 4.1.9, which you can download here
[/quote]
4.To verify, try to run the following code:
[code]
require 'mysql'
puts Mysql::VERSION[/code]
If it outputs 20700, then you’re all set up