I\'m new with RoR and I\'m trying to install Mysql2 -v \'0.3.11\'. I have OS X Mountain Lion, rails 3.2.6 ,ruby 1.9.3.
Below is the error I get. I looked everywher
As Deefour said, I had to use RVM. Answer goes to him, I just couldn't comment on his answer. +1
But rvm exec bundle install
gave me an error:
rvm do bundle install
was removed, use rvm 1.9.2,1.9.3 do bundle install
or rvm all do bundle install
instead.
I used
sudo rvm all do bundle install
and it all went flawlessly from then on.
You're using RVM instead of the Ruby that comes with 10.8. Good. Now, stop using the MySQL that comes with 10.8.
Install and update Homebrew. Now run
brew install mysql
Use the /Gemfile
in your project to install the mysql2
gem. Add
gem "mysql2"
to your /Gemfile
. Then update your application with Bundler by running
bundle install
Let the package managers (Homebrew and Bundler) work for you.
This should fix the issues you're having.
I too get same type of error in mac10.10 and used below commands that work for me:
Install and upgrade Homebrew using:
brew install mysql
run Install Mysql gem file using:
gem install mysql2 -v '0.3.11'
Run bundle install