You want to look in the gem extension's build directory for the actual  
output file from "configure". When it is testing something like  
"looking for mysql.h", what it is really doing is trying to compile a  
very simple C program that uses "include <mysql.h>" or equivalent.   
Although the "configure" program only outputs yes or no when it is  
run, it will also generally leave a log with the actual compiler  
error, and possibly the test code and command. With that you can  
figure out if the Ruby setup is at fault, or if you have some other,  
possibly unrelated compiler issue.

On Oct 30, 2009, at 9:51 PM, Gisborne <[email protected]> wrote:

>
> On Oct 30, 3:29 pm, Kerry Foley <[email protected]> wrote:
>> Anyway my problem was that I had previously done a "gem install"  
>> and had
>> the mysql gem installed in /Users/<user>/.gem as well as on the  
>> system
>> in /usr. Neither "gem uninstall" or "sudo gem uninstall" would get  
>> rid
>> of the user copy, even though it showed up via "gem list". When I
>> deleted it manually I was able to proceed with a fresh "sudo gem  
>> install
>> ..." and everything compiled.....
>
> I don't think this is it: I don't see the gem in gem list --local.
>
>> When I was researching my problem I came across some people who had
>> compile problems because the mysql library files were in
>> /usr/local/mysql/lib instead of /usr/local/mysql/lib/mysql.  One of  
>> your
>> errors was "checking for mysql/mysql.h... no" so it may be related.
>> This didn't fix anything for me but that issue can be solved by  
>> creating
>> a link in /usr/local/mysql/lib for mysql:
>> "sudo ln -s . mysql"
>
> I don't think this is the issue; mysql_config is pointing at precisely
> the right place.
>
>> Lastly, and you've probably done this already, but in Ubuntu you  
>> need to
>> install the "build-essential" package to get the c/c++ header files  
>> for
>> building native extensions. Unlikely to be your problem since it's  
>> mysql
>> specific header info but in CentOS you might need to do:
>> yum groupinstall "Development Tools"
>> or maybe
>> yum install gcc gcc-c++ kernel-devel
>> or maybe
>> yum install buildsys-build
>
> This I hadn't done, but it doesn't help.
>
> One thing I haven't mentioned is that I'm using ruby-enterprise-1.8.6,
> along with ruby-devel-1.8.6. I don't see a ruby-enterprise-devel
> anywhere, and my understanding of Enterprise is that it's binary
> compatible with ruby, so I think that's okay.
>
> What sort of diagnostics might I perform to see why this is failing?
> >

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to