Skip to content

Commit bcb1a02

Browse files
committed
Documentation for the gem install options
1 parent b1e14b3 commit bcb1a02

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,27 @@ gem install mysql2
2222

2323
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.
2424

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

2747
### Windows
2848
First, make sure you have the DevKit installed (http://rubyinstaller.org/downloads/) and its variables

0 commit comments

Comments
 (0)