I am trying to install the mysql 2.8.1 gem. I would be using it to build a Rails 2.0.2 application on Ubuntu 10.04. I would be using Ruby 1.8.7. I have installed the develop
Try this and then install the mysql gem:
sudo apt-get install libmysqlclient-dev libmysqlclient16
This worked after then running sudo gem install mysql.
The documentation still doesn't install correctly (heaps of "No definition" errors, although thats not really a biggie.
You should do what the error message tells you: check the mkmf.log! Search for this file using find /usr/lib/ruby/gems/1.8/gems/ -name mkmf.log. Usually, this error message appears because you forgot to install the -dev package for the extension you were trying to install. So if you wanted to install the mysql gem, you probably forgot to install the libmysqlclient14-dev first. Do an apt-cache search | grep dev to find the appropriate packages.
plz check this for more information
Try this and then install the mysql gem:
sudo apt-get install libmysqlclient-dev
If that's not sufficient try it like this
sudo apt-get install libmysqlclient-dev libmysqlclient16 ruby-dev
In my case, I had the following error message:
An error occurred while installing mysql (2.8.1), and Bundler cannot continue. Make sure that
gem install mysql -v '2.8.1'
succeeds before bundling.
I tried: gem install mysql -v '2.8.1'
, and I got an error message similar to what you got.
I fixed it doing the following:
STEP (1): run this: sudo apt-get install libmysqlclient-dev
STEP (2): install mysql: gem install mysql -v 2.8.1
You should get a success message similar to this:
Successfully installed mysql-2.8.1
Installing ri documentation for mysql-2.8.1 1 gem installed
I hope my answer helps.