You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,27 @@ gem install mysql2
22
22
23
23
This gem links against MySQL's `libmysqlclient` C shared library. You may need to install a package such as `libmysqlclient-dev`, `mysql-devel`, or other appropriate package for your system.
24
24
25
-
If you have installed MySQL to a non-standard location, add `gem install mysql2 --with-mysql-config=/some/random/path/bin/mysql_config`
25
+
By default, the mysql2 gem will try to find a copy of MySQL in this order:
26
+
27
+
* Option `--with-mysql-dir`, if provided (see below).
28
+
* Option `--with-mysql-config`, if provided (see below).
29
+
* Several typical paths for `msyql_config` (default for the majority of users).
30
+
* The directory `/usr/local`.
31
+
32
+
### Configuration options
33
+
34
+
Use these options by `gem install mysql2 -- [--optionA] [--optionB=argument]`.
35
+
The following options are mutually exclusive.
36
+
37
+
*`--with-mysql-dir[=/path/to/mysqldir]` -
38
+
Specify the directory where MySQL is installed. The mysql2 gem will not use
39
+
`mysql_config`, but will instead look at `mysqldir/lib` and `mysqldir/include`
40
+
for the library and header files.
41
+
42
+
*`--with-mysql-config[=/path/to/mysql_config]` -
43
+
Specify a path to the `mysql_config` binary provided by your copy of MySQL. The
44
+
mysql2 gem will ask this `mysql_config` binary about the compiler and linker
45
+
arguments needed.
26
46
27
47
### Windows
28
48
First, make sure you have the DevKit installed (http://rubyinstaller.org/downloads/) and its variables
0 commit comments