I found a blog post that solves this problem ( http://nmanzi.com/?p=39
) and I turned it into a script so that you just have to run "./
install_mysql_ruby_adapter"

http://github.com/thirdreplicator/install_mysql_ruby_adapter_for_ruby1.9/tree/master

I run Ruby 1.9.1 on Ubuntu 8.04/8.10 and CentOS 5.2 with root
access.

David :)


On Jun 2, 11:43 pm, Ni Pa <[email protected]> wrote:
> I tried:
>
> <-- clip starts -->
> [root]#geminstallmysql-- --with-mysql-config=/usr/bin/mysql_config
> Building native extensions.  This could take a while...
> ERROR:  Error installingmysql:
>         ERROR: Failed to buildgemnative extension.
>
> /usr/local/bin/ruby extconf.rbinstallmysql--
> --with-mysql-config=/usr/bin/mysql_config
> checking for mysql_ssl_set()... no
> checking formysql.h... no
> checking formysql/mysql.h... no
> *** extconf.rb failed ***
> 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.
>
> Provided configuration options:
>         --with-opt-dir
>         --without-opt-dir
>         --with-opt-include
>         --without-opt-include=${opt-dir}/include
>         --with-opt-lib
>         --without-opt-lib=${opt-dir}/lib
>         --with-make-prog
>         --without-make-prog
>         --srcdir=.
>         --curdir
>         --ruby=/usr/local/bin/ruby
>         --with-mysql-config
>
> Gemfiles will remain installed in
> /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
> Results logged to
> /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
> <-- clip ends -->
>
> Steps I needed on CentOS 5 linux were (in addition to installed 'normal'mysql)
> 1.Installmysql-devel "yuminstallmysql-devel" as root
> 2. Find the location of mysql_config "locate mysql_config" and fix that
> full path to "--with-mysql-config=" option
> 3. Success!
>
> <-- clip starts -->
> [root]#geminstallmysql--
> --with-mysql-config=/usr/lib/mysql/mysql_config
> Building native extensions.  This could take a while...
> Successfully installedmysql-2.7
> 1geminstalled
> <-- clip ends -->
> --
> Posted viahttp://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to