mysql gem installation

  • Thread starter Michael Satterwhite
  • Start date
M

Michael Satterwhite

Thanking everyone for all the help I've been given to this point, I'm
trying to get the mysql interface for ruby installed. I first tried
using the distribution (Ubuntu breezy) apt-get to install the
libmysql-ruby. It installs, but ruby doesn't recognize it (I've done a
compile of 1.8.5 and installed that, after some help from the people
here).

I then tried
sudo gem install mysql

It asks me which version I want installed, I picked 2.7 (ruby). gem runs
for a bit, then gives me the following error:

Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

---
If I'm reading mkmf.log correctly, the problem is in finding
mysqlclient.

Does anyone know how to address this one? Also, are there any other gems
that I should install to have a good, working ruby installation?

Again, thanks for the help to this point..

---Michael
 
R

Rick DeNatale

I then tried
sudo gem install mysql

It asks me which version I want installed, I picked 2.7 (ruby). gem runs
for a bit, then gives me the following error:

Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

---
If I'm reading mkmf.log correctly, the problem is in finding
mysqlclient.

Does anyone know how to address this one? Also, are there any other gems
that I should install to have a good, working ruby installation?

It should be complaining about one or more specific files, and these
should probably be either header (.h), or libraries (.so) files.

Once you know what file(s) you are looking for, the next trick is to
figure out which ubuntu/debian package(s) include(s) that/those files.
Sometimes it's fairly obvious. One hint is that if it's a header
file the package name is likely to have dev (for development).

A tool, which might be useful, is apt-file which comes in a package of
that name. If you install that package you can issue the command:

apt-file search xxx.h

where xxx.h is the name of a file you are looking for. It' will
search the same repositories that apt-get (and synaptic or aptitude or
...) does for files in packages without needing the packages to be
installed.

Before it works though you need to load its cache by doing the command

apt-file update


--
Rick DeNatale

IPMS/USA Region 12 Coordinator
http://ipmsr12.denhaven2.com/

Visit the Project Mercury Wiki Site
http://www.mercuryspacecraft.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top