[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem reinstalling mysql gem

Michael Satterwhite

11/25/2006 4:10:00 AM

I had to reload my system and am trying to bring up ruby on my kubuntu
system. I've compiled / installed ruby and rubygems. I then run
sudo gem install mysql -y

I select 2 when it asks for mysql 2.7 (ruby). It then runs a bit, then I
get the following errors:

ERROR: Failed to build gem native extension.
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

I have no idea what to look at other than the file that supposedly it
was logged to, but the "gem_make.out" file has absolutely nothing in it
(actually, it has 1 byte, but I think it's a space)

Can anyone offer any help.
As always, thanks in advance.
---Michael

--
Posted via http://www.ruby-....

6 Answers

Carl Woodward

11/25/2006 4:27:00 AM

0

Hi Michael,

If you are running on osx you probably have the compile problem listed
on this site:

http://www.railtie.net/articles/2006/09/12/running-rails-on-os-x-with-my...

Once you add the #define ulong unsigned long as one of the top lines
of mysql.c in the gem, you can just do:

- sudo ruby extconf.rb
- sudo make
- sudo make install

Let me know if this helps?

Cheers,
Carl.

On 11/25/06, Michael Satterwhite <michael@weblore.com> wrote:
> I had to reload my system and am trying to bring up ruby on my kubuntu
> system. I've compiled / installed ruby and rubygems. I then run
> sudo gem install mysql -y
>
> I select 2 when it asks for mysql 2.7 (ruby). It then runs a bit, then I
> get the following errors:
>
> ERROR: Failed to build gem native extension.
> 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
>
> I have no idea what to look at other than the file that supposedly it
> was logged to, but the "gem_make.out" file has absolutely nothing in it
> (actually, it has 1 byte, but I think it's a space)
>
> Can anyone offer any help.
> As always, thanks in advance.
> ---Michael
>
> --
> Posted via http://www.ruby-....
>
>


--
Carl Woodward
0412218979
cjwoodward@gmail.com

Michael Satterwhite

11/25/2006 4:51:00 AM

0

Carl Woodward wrote:
> Hi Michael,
>
> If you are running on osx you probably have the compile problem listed
> on this site:

Good try, but I'm running Kubuntu Linux.

--
Posted via http://www.ruby-....

Carl Woodward

11/25/2006 5:01:00 AM

0

Ahh k,

not sure then, you will need to get the error out or you can use apt
to install it?

Cheers,
Carl.

On 11/25/06, Michael Satterwhite <michael@weblore.com> wrote:
> Carl Woodward wrote:
> > Hi Michael,
> >
> > If you are running on osx you probably have the compile problem listed
> > on this site:
>
> Good try, but I'm running Kubuntu Linux.
>
> --
> Posted via http://www.ruby-....
>
>


--
Carl Woodward
0412218979
cjwoodward@gmail.com

Michael Satterwhite

11/25/2006 2:21:00 PM

0

Carl Woodward wrote:
> Ahh k,
>
> not sure then, you will need to get the error out or you can use apt
> to install it?

Getting the error out seems to be a problem. It tells me where it has
logged it, but it didn't put anything in that file.


--
Posted via http://www.ruby-....

Stefan Mahlitz

11/25/2006 7:35:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Satterwhite wrote:
> Carl Woodward wrote:
>> Ahh k,
>>
>> not sure then, you will need to get the error out or you can use apt
>> to install it?
>
> Getting the error out seems to be a problem. It tells me where it has
> logged it, but it didn't put anything in that file.

Try to install the Ubuntu-Mysql development packages. I guess it is
libmysqlclient12-dev, but I'm not sure about this.

If gem_make.out is empty you can have a look into mkmf.log (same directory).

Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFFaJrL9S2Eui6zfdQRAtGlAJ0Un51HeS5yCQhnAg1uNye0Vh65EACgraIB
2a09b1o5XuAiZDUtjSMyKU8=
=de8O
-----END PGP SIGNATURE-----

Ezra Zygmuntowicz

11/26/2006 8:14:00 PM

0


On Nov 24, 2006, at 8:10 PM, Michael Satterwhite wrote:

> I had to reload my system and am trying to bring up ruby on my kubuntu
> system. I've compiled / installed ruby and rubygems. I then run
> sudo gem install mysql -y
>
> I select 2 when it asks for mysql 2.7 (ruby). It then runs a bit,
> then I
> get the following errors:
>
> ERROR: Failed to build gem native extension.
> 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
>
> I have no idea what to look at other than the file that supposedly it
> was logged to, but the "gem_make.out" file has absolutely nothing
> in it
> (actually, it has 1 byte, but I think it's a space)
>
> Can anyone offer any help.
> As always, thanks in advance.
> ---Michael


Hey Michael-

Run this command:

$ which mysql_config

If that returns a path to mysql_config then you can install the
mysql gem with this command:

$ sudo gem install mysql -- --with-mysql-config

If you don't have mysql_config in your path then you may be better
off trying to install the .deb package for libmysql-ruby from apt.

Cheers-

-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- ez@engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)