I\'m trying to get MySQL installed to the latest version due to some installation going wrong somewhere along the line. I run the command gem install mysql
and
I had also forgotten to actually install MySQL in the first place. Following this guide helped a lot.
http://www.djangoapp.com/blog/2011/07/24/installation-of-mysql-server-on-mac-os-x-lion/
As well as adding these lines to my .profile:
export PATH="/usr/local/mysql/bin:$PATH"
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
if you are installing from source here is a tutorial.would be happy if it helps http://raihan90.blogspot.com/2009/03/mysql-step-by-step-hacking-into-mysql.html
A number of people found this post helpful.
Also, I needed to do first type this:
yum install mysql-devel
and then:
gem install mysql
For some people you may need to type:
gem install mysql -- --with-mysql-config=/usr/local/mysql/mysql_config
yum -y install gcc mysql-devel ruby-devel rubygems
gem install mysql2
on OSX mountain Lion: If you have brew
installed, then brew install mysql
and follow the instructions
on creating a test database with mysql on your machine.
You don't have to go all the way through, I didn't need to
After I did that I was able to bundle install and rake.
In order to resolve
Gem::Ext::BuildError: ERROR: Failed to build gem native extension error for mysql2,
I think libmysql-ruby got changed with ruby-mysql
Simply try with following commands,
sudo apt-get install ruby-mysql
& then
sudo apt-get install libmysqlclient-dev