Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
ruby-mysql install woes
Greg Willits
10/27/2007 2:12:00 PM
OS X 10.4.10
ruby 1.8.4 (ruby installed using
http://rubyosx.ruby...
)
Trying to install riuby-mysql 2.7.4
Every blog & refc I can find doesn't work.
Using gem fails. Tried all the suggestions found on blogs.
Using the native package from tmtm.org fails, but I get further with it.
One tip I picked up which helps the native install to get further along
was to add "#define ulong unsigned long" at the top of the mysql.c file
(which does not exist with the gem install).
after I make install I get this response
/usr/bin/install -c -m 0755 mysql.bundle
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0
then I try to do a simple two liner just to see if I get complaints
#! /usr/local/bin/ruby
require 'mysql'
and indeed I get this complaint:
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle:
Failed to load
/usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle
(LoadError)
I'm no C geek, so I have no idea what to try next.
Ideas?
-- gw
--
Posted via
http://www.ruby-...
.
3 Answers
Greg Willits
10/27/2007 2:47:00 PM
0
Greg Willits wrote:
> OS X 10.4.10
> ruby 1.8.4 (ruby installed using
http://rubyosx.ruby...
)
>
> Trying to install riuby-mysql 2.7.4
> Using the native package from tmtm.org...
> One tip I picked up which helps the native install to get further along
> was to add "#define ulong unsigned long" at the top of the mysql.c file
> after I make install I get this response
> /usr/bin/install -c -m 0755 mysql.bundle
> /usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0
> then I try to do a simple two liner just to see if I get complaints
> #! /usr/local/bin/ruby
> require 'mysql'
>
> and indeed I get this complaint:
>
> /usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle:
> Failed to load
> /usr/local/lib/ruby/site_ruby/1.8/universal-darwin8.0/mysql.bundle
> (LoadError)
btw the gcc I have installed is 4.01
looking closer, after make I get all this rot which maybe is meaningful
to someone. it looked to me like it's just recognizing that there's no
intel CPU, but maybe something in here is problematic?
gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
-DHAVE_MYSQL_H
-I/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/include -Os -arch ppc
-fno-common -fno-common -g -O2 -fno-common -pipe -fno-common -arch
i386 -c mysql.c
cc -dynamic -bundle -undefined suppress -flat_namespace -arch i386
-L"/usr/local/lib" -o mysql.bundle mysql.o -lruby
-L/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/lib -lmysqlclient -lz
-lm -lpthread -ldl -lobjc
/usr/bin/ld: warning
/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/lib/libmysqlclient.a
archive's cputype (18, architecture ppc) does not match cputype (7) for
specified -arch flag: i386 (can't load from it)
/usr/bin/ld: warning
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libz.dylib cputype (18,
architecture ppc) does not match cputype (7) for specified -arch flag:
i386 (file not loaded)
/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)
/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libpthread.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)
/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)
/usr/bin/ld: warning
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libobjc.dylib cputype
(18, architecture ppc) does not match cputype (7) for specified -arch
flag: i386 (file not loaded)
/usr/bin/ld: warning fat file:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)
/usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)
-- gw
--
Posted via
http://www.ruby-...
.
Greg Willits
10/27/2007 9:11:00 PM
0
OS X 10.4.10 on Power PC machine
ruby 1.8.4 (ruby installed using
http://rubyosx.ruby...
)
> Trying to install mysql-ruby 2.7.4
> Using the native package from tmtm.org...
> One tip I picked up which helps the native install to get further along
> was to add "#define ulong unsigned long" at the top of the mysql.c file
I got it to work. Applied 25 years of engineering in various fields and
disciplines... and guessed. I'll write up details in a while, but just
wanted to say I managed to hack it into working.
-- gw
--
Posted via
http://www.ruby-...
.
Greg Willits
10/28/2007 9:53:00 AM
0
Greg Willits wrote:
> OS X 10.4.10
> ruby 1.8.6 (ruby installed using
http://rubyosx.ruby...
)
>
> Trying to install mysql-ruby 2.7.4
> Every blog & refc I can find doesn't work.
> Using gem fails. Tried all the suggestions found on blogs.
> Using the native package from tmtm.org fails, but I get further with it.
The gist of the trouble is that if you have a PowerPC Mac, the
instructions don't work as they assume an intel-based Mac.
I figured it out, and wrote up in detail what it took to make it work
for me.
http://www.railsdev.ws/blog/9/compiling-mysql-ruby-fo...
-- gw
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
ruby-mysql install woes
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password