Mysql gem

Hi. I’m new on Ruby on Rails, on a Mac OS X 10.5. I’m working with
Aptana and I’ve got an message error telling me to install mysql via
gem.
But when I’m doing gem install mysql, i’ve got this message :


Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql – --with-mysql-dir=/usr/local/mysql
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lm… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lz… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lsocket… no
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lnsl… no
checking for mysql_query() in -lmysqlclient… 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.


Should somebody help me, plese ? Thanks a lot.

On Apr 6, 10:56 am, Daniel B. [email protected]
wrote:

Hi. I’m new on Ruby on Rails, on a Mac OS X 10.5. I’m working with
Aptana and I’ve got an message error telling me to install mysql via
gem.
But when I’m doing gem install mysql, i’ve got this message :

Where have you installed mysql? What gem command did you run ?

Fred

Find and locate mysql_config on your machine and do a

gem install mysql – --with-mysql-config=/usr/local/mysql/bin/
msql_config

or whichever directory contains your Mysql install. I personally find
the config file option to be more reliable during gem install rather
than just using the mysql-dir.

On Apr 6, 2:56 pm, Daniel B. [email protected]

Mukund wrote:

Find and locate mysql_config on your machine and do a

Well, no mysql_config at all…

Mukund wrote:

Find and locate mysql_config on your machine and do a

Sorry, in fact I found it and now, I got this :


gem install mysql –
–with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
ERROR: While executing gem … (RuntimeError)
Error instaling mysql:
invalid gem format for mysql

Frederick C. wrote:

On 6 Apr 2008, at 18:24, Daniel B. wrote:

Mukund wrote:

Find and locate mysql_config on your machine and do a

Well, no mysql_config at all…

Where did you get mysql from? On my mac mysql is installed in /usr/
local/mysql (and mysql_config is in /usr/local/mysql/bin)

Fred

My mysql has benn installed by MAMP, an all in one (apache Mysql php)

On 6 Apr 2008, at 18:24, Daniel B. wrote:

Mukund wrote:

Find and locate mysql_config on your machine and do a

Well, no mysql_config at all…

Where did you get mysql from? On my mac mysql is installed in /usr/
local/mysql (and mysql_config is in /usr/local/mysql/bin)

Fred

You may have to give gem a hint as to your architecture:

ARCHFLAGS="-arch i386" sudo gem install mysql – --with-mysql-config=/
Applications/MAMP/Library/bin/mysql_config

or

ARCHFLAGS="-arch ppc" sudo gem install mysql – --with-mysql-config=/
Applications/MAMP/Library/bin/mysql_config

-Christopher Haupt
-LearningRails.com

On Apr 6, 11:51 am, Daniel B. [email protected]

Chris Haupt wrote:

You may have to give gem a hint as to your architecture:

ARCHFLAGS="-arch i386" sudo gem install mysql – --with-mysql-config=/
Applications/MAMP/Library/bin/mysql_config

Well, the answer is now :

ARCHFLAGS="-arch i386" gem install mysql – --with-mysql-config=/
Select which gem to install for your platform (universal-darwin8.0)

  1. mysql 2.7.3 (mswin32)
  2. mysql 2.7.1 (mswin32)
  3. mysql 2.7 (ruby)
  4. mysql 2.6 (ruby)
  5. Skip this gem
  6. Cancel installation

3
Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql – --with-mysql-config=/
extconf.rb:1: command not found: / --cflags
*** 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

Gem files 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

On Apr 7, 7:35 pm, Daniel B. [email protected]
wrote:

Chris Haupt wrote:

You may have to give gem a hint as to your architecture:

ARCHFLAGS="-arch i386" sudo gem install mysql – --with-mysql-config=/
Applications/MAMP/Library/bin/mysql_config

It looks like it got confused by a extra line ending in between the –
with-mysql-config=/ and the Applications…

Fred

Frederick C. wrote:

It looks like it got confused by a extra line ending in between the –
with-mysql-config=/ and the Applications…

Fred

Well… I’m gonna become crazy… :

sh-3.2# ARCHFLAGS="-arch i386" gem install mysql –
–with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
Select which gem to install for your platform (universal-darwin8.0)

  1. mysql 2.7.3 (mswin32)
  2. mysql 2.7.1 (mswin32)
  3. mysql 2.7 (ruby)
  4. mysql 2.6 (ruby)
  5. Skip this gem
  6. Cancel installation

3
Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql –
–with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
checking for mysql_ssl_set()… no
checking for mysql.h… no
checking for mysql/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

Gem files 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs