@@ -53,24 +53,21 @@ are located somewhere different than on your build system.
53
53
This overrides any rpath calculated by default or by the options above.
54
54
55
55
### Windows
56
- First, make sure you have the DevKit installed ( http://rubyinstaller.org/downloads/ ) and its variables
57
- are loaded by running devkit\devktvars.bat .
56
+ Make sure that you have Ruby and the DevKit compilers installed. We recommend
57
+ the [ Ruby Installer ] ( http://rubyinstaller.org ) distribution .
58
58
59
- Next, you need a MySQL library to link against. If you have MySQL loaded on your development machine,
60
- you can use that. If not, you will need to either copy the MySQL directory from your server, or else
61
- obtain a copy of the MySQL C connector: http://dev.mysql.com/downloads/connector/c/
59
+ By default, the mysql2 gem will download and use MySQL Connector/C from
60
+ mysql.com. If you prefer to use a local installation of Connector/C, add the
61
+ flag ` --with-mysql-dir=c:/mysql-connector-c-x-y-z ` ( _ this path may use forward slashes _ ).
62
62
63
- If you're using the connector, I recommend just getting the .zip file and unzipping it someplace convenient.
63
+ By default, the ` libmysql.dll ` library will be copied into the mysql2 gem
64
+ directory. To prevent this, add the flag ` --no-vendor-libmysql ` . The mysql2 gem
65
+ will search for ` libmysql.dll ` in the following paths, in order:
64
66
65
- Now you can install mysql2. You must use the ` --with-mysql-dir ` option to tell gem where your MySQL library
66
- files are. For example, if you unzipped the connector to c:\mysql-connector-c-6.1.1-win32 you would install
67
- the gem like this:
68
-
69
- gem install mysql2 -- --with-mysql-dir=c:\mysql-connector-c-6.1.1-win32
70
-
71
- Finally, you must copy libmysql.dll from the lib subdirectory of your MySQL or MySQL connector directory into
72
- your ruby\bin directory. In the above example, libmysql.dll would be located at
73
- c:\mysql-connector-c-6.1.1-win32\lib .
67
+ * Environment variable ` RUBY_MYSQL2_LIBMYSQL_DLL=C:\path\to\libmysql.dll `
68
+ (_ note the Windows-style backslashes_ ).
69
+ * In the mysql2 gem's own directory ` vendor/libmysql.dll `
70
+ * In the system's default library search paths.
74
71
75
72
## Usage
76
73
0 commit comments