Skip to content

Commit f53219f

Browse files
committed
Update the Windows section of the README
1 parent df58a81 commit f53219f

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,21 @@ are located somewhere different than on your build system.
5353
This overrides any rpath calculated by default or by the options above.
5454

5555
### 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.
5858

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_).
6262

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:
6466

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.
7471

7572
## Usage
7673

0 commit comments

Comments
 (0)