For Win 7:
- Download a zip file with mysql server 5.1 NOT the msi one. Make sure it's 32-bit NOT 64-bit. (From here)
- Since there is no installer file with this, create a folder c:\mysql-gem-install - you can remove it once you finish.
- Extract all the files from the zip file into the folder you just created.
- now run this commandgem install mysql2 -- '--with-mysql-lib="c:\mysql-gem-install\lib\opt" --with-mysql-include="c:\mysql-gem-install\include"'
I just installed mysql2 gem v. 0.3.7
EDIT: One more thing: make sure you run the command in Command Prompt directly. As in not PowerShell or Consol2 - for some reason if you try that it will give you and error " invalid option" - has to do with the way -- is parsed.
--Answered by Nick Gorbikoff
For Linux:
sudo apt-get install libmysql-ruby libmysqlclient-dev
--Answered by spacemonkey
I successfully installed mysql 5.5, and gem mysql2-0.3.7
You sir, are a genius.
ReplyDelete*tips hat*