[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

nitro, og, mysql, freebsd

Denis Nikiforov

5/9/2006 10:06:00 AM

(transmit-message (Hello *All*)
(Say '(

mysql-ruby doesn't work on FreeBSD:

,----
| /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
| I, [2006-05-09T15:54:21.976368 #79565] INFO -- : Og uses the Mysql store.
| /web/itartass/gems/gems/og-0.30.0/lib/og/store/mysql.rb:215: [BUG] Segmentation fault
| ruby 1.8.4 (2005-12-24) [i386-freebsd4.11]
|
| Abort trap
`----

What's the problem and how could it be fixed?

Og die on this line:
,----[ /web/itartass/gems/gems/og-0.30.0/lib/og/store/mysql.rb:215 ]
| actual_fields = conn.list_fields(klass::OGTABLE).fetch_fields.map {|f| f.name }
`----

--
))) => t
13 Answers

Eirik Mikkelsen

5/9/2006 11:47:00 AM

0

Denis Nikiforov <denis@ural.org> writes:

> (transmit-message (Hello *All*)
> (Say '(
>
> mysql-ruby doesn't work on FreeBSD:
>
> ,----
> | /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
> | I, [2006-05-09T15:54:21.976368 #79565] INFO -- : Og uses the Mysql store.
> | /web/itartass/gems/gems/og-0.30.0/lib/og/store/mysql.rb:215: [BUG] Segmentation fault
> | ruby 1.8.4 (2005-12-24) [i386-freebsd4.11]
> |
> | Abort trap
> `----
>
> What's the problem and how could it be fixed?

This could possibly be pthreads-related - in that case try ruby-nopthreads
from ports.

--
Eirik

Denis Nikiforov

5/9/2006 11:52:00 AM

0

(transmit-message (Hello 'Denis)
(You-wrote :on "Tue, 09 May 2006 16:05:47 +0600")
(Say '(

DN> mysql-ruby doesn't work on FreeBSD:

I'd used different configuration options for mysql-ruby and I've got
different error messages:

$ ruby extconf.rb --with-mysql-include=/usr/servers/mysql-4.1.18/include/
$ make && make install

,----
| /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
| I, [2006-05-09T17:39:13.175400 #79065] INFO -- : Og uses the Mysql store.
| /web/itartass/gems/gems/og-0.30.0/lib/og/store/mysql.rb:215: [BUG] Segmentation fault
| ruby 1.8.4 (2005-12-24) [i386-freebsd4.11]
|
| Abort trap
`----

$ ruby extconf.rb --with-mysql-include=/usr/servers/mysql-4.1.18/include/ --with-mysql-lib=/usr/servers/mysql-4.1.18/lib/mysql/
$ make && make install

,----
| /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
| I, [2006-05-09T17:40:23.458344 #80619] INFO -- : Og uses the Mysql store.
| E, [2006-05-09T17:40:23.477935 #80619] ERROR -- : Og.setup had problems: Mysql::Error => Can't connect to local MySQL server through socket '' (2)
| I, [2006-05-09T17:40:23.489313 #80619] INFO -- : Using Memory sessions.
`----

$ ruby extconf.rb --with-mysql-config=/usr/servers/mysql-4.1.18/bin/mysql_config
$ make && make install

,----
| /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
| I, [2006-05-09T17:41:11.057679 #81718] INFO -- : Og uses the Mysql store.
| E, [2006-05-09T17:41:11.062366 #81718] ERROR -- : Ruby-Mysql bindings are not installed!
| E, [2006-05-09T17:41:11.062632 #81718] ERROR -- : Trying to use the pure-Ruby binding included in Og
| E, [2006-05-09T17:41:11.119577 #81718] ERROR -- : Og.setup had problems: Errno::ENOENT => No such file or directory - /tmp/mysql.sock
| I, [2006-05-09T17:41:11.130730 #81718] INFO -- : Using Memory sessions.
`----

I guess last case is a best way of configuration, but why ruby-mysql
couldn't be found?

--
))) => t

Denis Nikiforov

5/9/2006 12:11:00 PM

0

(transmit-message (Hello 'Denis)
(You-wrote :on "Tue, 09 May 2006 17:52:14 +0600")
(Say '(

DN>> mysql-ruby doesn't work on FreeBSD:

DN> I'd used different configuration options for mysql-ruby and I've got
DN> different error messages:

And 4th error message ;(

$ gem install mysql-2.7.gem -- --with-mysql-config=/usr/servers/mysql-4.1.18/bin/mysql_config

,----
| /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
| I, [2006-05-09T18:07:46.313304 #8011] INFO -- : Og uses the Mysql store.
| E, [2006-05-09T18:07:46.330214 #8011] ERROR -- : Og.setup had problems: NameError => uninitialized constant Mysql
| I, [2006-05-09T18:07:46.340645 #8011] INFO -- : Using Memory sessions.
`----

--
))) => t

Denis Nikiforov

5/9/2006 12:25:00 PM

0

(transmit-message (Hello 'Eirik)
(You-wrote :on "09 May 2006 13:46:55 +0200")
(Say '(

>> mysql-ruby doesn't work on FreeBSD:
>>
>> ,----
>> | /web/itartass/site/www/tmp/sotp $ ./public/dispatch.cgi
>> | I, [2006-05-09T15:54:21.976368 #79565] INFO -- : Og uses the Mysql store.
>> | /web/itartass/gems/gems/og-0.30.0/lib/og/store/mysql.rb:215: [BUG] Segmentation fault
>> | ruby 1.8.4 (2005-12-24) [i386-freebsd4.11]
>> |
>> | Abort trap
>> `----
>>
>> What's the problem and how could it be fixed?

EM> This could possibly be pthreads-related - in that case try
EM> ruby-nopthreads from ports.

My home OS is GNU/Linux and I'm not very familiar with FreeBSD and it's
ports. I've compiled ruby from sources. Should I use --disable-pthread
for configuration?

--
))) => t

Eirik Mikkelsen

5/9/2006 1:11:00 PM

0

Denis Nikiforov <denis@ural.org> writes:
> EM> This could possibly be pthreads-related - in that case try
> EM> ruby-nopthreads from ports.
>
> My home OS is GNU/Linux and I'm not very familiar with FreeBSD and it's
> ports. I've compiled ruby from sources. Should I use --disable-pthread
> for configuration?

There is a separate port called "ruby-nopthreads". If the ports tree
is installed you can go to /usr/ports/lang/ruby18-nopthreads and type
"make install clean". You may want to "make deinstall" your current
ruby first to avoid conflicts.

If you aren't using ports you can make with --disable-pthread as you
suggested.

--
Eirik

Denis Nikiforov

5/9/2006 1:39:00 PM

0

(transmit-message (Hello 'Eirik)
(You-wrote :on "09 May 2006 15:11:27 +0200")
(Say '(

>> EM> This could possibly be pthreads-related - in that case try
>> EM> ruby-nopthreads from ports.
>>
>> My home OS is GNU/Linux and I'm not very familiar with FreeBSD and it's
>> ports. I've compiled ruby from sources. Should I use --disable-pthread
>> for configuration?

EM> There is a separate port called "ruby-nopthreads". If the ports tree
EM> is installed you can go to /usr/ports/lang/ruby18-nopthreads and type
EM> "make install clean". You may want to "make deinstall" your current
EM> ruby first to avoid conflicts.

EM> If you aren't using ports you can make with --disable-pthread as you
EM> suggested.

I've rebuild ruby with --disable-pthread, but receive same errors ;(
The last one (after installation of mysql-2.7.gem) seems very strange:

E, [2006-05-09T19:27:27.595847 #93442] ERROR -- : Og.setup had problems: NameError => uninitialized constant Mysql

But on my local linux-machine (with same versions of ruby, og, ...)
mysql-2.7.gem works fine.

--
))) => t

Denis Nikiforov

5/9/2006 2:26:00 PM

0

(transmit-message (Hello 'Denis)
(You-wrote :on "Tue, 09 May 2006 19:38:35 +0600")
(Say '(

EM>> If you aren't using ports you can make with --disable-pthread as
EM>> you suggested.

DN> I've rebuild ruby with --disable-pthread, but receive same errors ;(
DN> The last one (after installation of mysql-2.7.gem) seems very strange:

DN> E, [2006-05-09T19:27:27.595847 #93442] ERROR -- : Og.setup had problems: NameError => uninitialized constant Mysql

DN> But on my local linux-machine (with same versions of ruby, og, ...)
DN> mysql-2.7.gem works fine.

I've put symlink to libmysqlclient.so.14 into my library path and it
fixed that problem. But now it tells me:

,----
| E, [2006-05-09T19:55:56.136990 #20202] ERROR -- : Og.setup had problems: Mysql::Error => Can't connect to local MySQL server through socket '' (2)
| E, [2006-05-09T19:55:56.137149 #20202] ERROR -- : #<Mysql::Error: Can't connect to local MySQL server through socket '' (2)>
`----

Why does mysql-ruby trying to connect to mysql server through
unix-socket, but not through tcp, port 3306? Neither of
/var/run/mysqld/mysqld.sock and /tmp/mysql.sock exists.

--
))) => t

gabriele renzi

5/9/2006 5:06:00 PM

0

Denis Nikiforov ha scritto:

> I've rebuild ruby with --disable-pthread, but receive same errors ;(
> The last one (after installation of mysql-2.7.gem) seems very strange:
>
> E, [2006-05-09T19:27:27.595847 #93442] ERROR -- : Og.setup had problems: NameError => uninitialized constant Mysql

I can'0t help you on the rest but this error actually means that Og
failed to load the mysql package. Basically Og keeps on going even if it
failed to load the library, and thus it fails trying to access the Mysql
constant which was not defined.

Denis Nikiforov

5/11/2006 2:04:00 AM

0

(transmit-message (Hello 'gabriele)
(You-wrote :on "Tue, 09 May 2006 17:05:36 GMT")
(Say '(

>> I've rebuild ruby with --disable-pthread, but receive same errors ;(
>> The last one (after installation of mysql-2.7.gem) seems very strange:
>> E, [2006-05-09T19:27:27.595847 #93442] ERROR -- : Og.setup had
>> problems: NameError => uninitialized constant Mysql

gr> I can'0t help you on the rest but this error actually means that Og
gr> failed to load the mysql package. Basically Og keeps on going even
gr> if it failed to load the library, and thus it fails trying to
gr> access the Mysql constant which was not defined.

Thanx to all. It works fine now ;) There are different fake versions of
mysql server (4.0, 4.1, 5.0) installed on this FreeBSD machine. But the
real one was hidden in the private folder without read access for
directories, but just for files. And I couldn't find it and I'd
configured mysql-ruby with wrong mysql libs.

PS: Og is a realy cool thing :) I've tried to write something similliar in
PHP, but it was waste of time. It's much easer to setup ruby on server
when to use PHP.

PPS: sorry for flood :)

--
))) => t

Anne G

9/30/2010 6:10:00 PM

0

30/09/10 11:51, pierre elliot cohen:


> Des vieux clochards qui portent plainte dans l'espoir d'avoir un ch?que

Ordure.