Skip to content

Commit c32f0f3

Browse files
committed
Merge pull request #577 from sodabrew/search_more_paths
Search more paths
2 parents 72deddd + 0ee177c commit c32f0f3

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
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

ext/mysql2/extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ def asplode lib
2020
/opt
2121
/opt/local
2222
/opt/local/mysql
23-
/opt/local/lib/mysql5
23+
/opt/local/lib/mysql5*
2424
/usr
2525
/usr/mysql
2626
/usr/local
2727
/usr/local/mysql
2828
/usr/local/mysql-*
29-
/usr/local/lib/mysql5
29+
/usr/local/lib/mysql5*
3030
].map{|dir| "#{dir}/bin" }
3131

3232
GLOB = "{#{dirs.join(',')}}/{mysql_config,mysql_config5}"

0 commit comments

Comments
 (0)