Skip to content

Commit f054424

Browse files
committed
Update README as suggested by @ain for OS X and Linux installation notes
1 parent 72deddd commit f054424

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ The API consists of two classes:
1616
`Mysql2::Result` - returned from issuing a #query on the connection. It includes Enumerable.
1717

1818
## Installing
19-
### OSX / Linux
19+
### General Instructions
2020
``` sh
2121
gem install mysql2
2222
```
2323

24-
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+
This gem links against MySQL's `libmysqlclient` library or `Connector/C`
25+
library, and compatible alternatives such as MariaDB.
26+
You may need to install a package such as `libmysqlclient-dev`, `mysql-devel`,
27+
or other appropriate package for your system. See below for system-specific
28+
instructions.
2529

2630
By default, the mysql2 gem will try to find a copy of MySQL in this order:
2731

@@ -52,6 +56,19 @@ This may be needed if you deploy to a system where these libraries
5256
are located somewhere different than on your build system.
5357
This overrides any rpath calculated by default or by the options above.
5458

59+
### Linux and other Unixes
60+
61+
You may need to install a package such as `libmysqlclient-dev` or `mysql-devel`;
62+
refer to your distribution's package guide to find the particular package.
63+
The most common issue we see is a user who has the library file `libmysqlclient.so` but is
64+
missing the header file `mysql.h` -- double check that you have the _-dev_ packages installed.
65+
66+
### Mac OS X
67+
68+
You may use MacPorts, Homebrew, or a native MySQL installer package. The most
69+
common paths will be automatically searched. If you want to select a specific
70+
MySQL directory, use the `--with-mysql-dir` or `--with-mysql-config` options above.
71+
5572
### Windows
5673
Make sure that you have Ruby and the DevKit compilers installed. We recommend
5774
the [Ruby Installer](http://rubyinstaller.org) distribution.
@@ -420,13 +437,13 @@ As for field values themselves, I'm workin on it - but expect that soon.
420437

421438
This gem is tested with the following Ruby versions on Linux and Mac OS X:
422439

423-
* Ruby MRI 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.x (ongoing patch releases)
440+
* Ruby MRI 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.x, 2.2.x (ongoing patch releases)
424441
* Ruby Enterprise Edition (based on MRI 1.8.7)
425442
* Rubinius 2.x
426443

427444
This gem is tested with the following MySQL and MariaDB versions:
428445

429-
* MySQL 5.0, 5.1, 5.5, 5.6
446+
* MySQL 5.0, 5.1, 5.5, 5.6, 5.7
430447
* MySQL Connector/C 6.0 and 6.1 (primarily on Windows)
431448
* MariaDB 5.5, 10.0
432449

0 commit comments

Comments
 (0)