Gem fails to build mysql

gem install mysql --with-mysql-lib=/usr/local/mysql/lib

ERROR: While executing gem … (OptionParser::InvalidOption)
invalid option: --with-mysql-lib=/usr/local/mysql/lib

gem install mysql – --with-mysql-lib=/usr/local/mysql/lib

notice the double --'s with a space in between


I should have explained why as well. the first set of double dashes
tells the gem command that any options following it are build options to
be sent to the gem rather than options for the gem command itself. The
command template looks like this:

gem install GEMNAME [options] – --build-flags [options]