nitro, og, mysql, freebsd

  • Thread starter Denis Nikiforov
  • Start date
D

Denis Nikiforov

(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 }
`----
 
E

Eirik Mikkelsen

Denis Nikiforov said:
(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.
 
D

Denis Nikiforov

(transmit-message (Hello 'Denis)
(You-wrote :eek:n "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?
 
D

Denis Nikiforov

(transmit-message (Hello 'Denis)
(You-wrote :eek:n "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.
`----
 
D

Denis Nikiforov

(transmit-message (Hello 'Eirik)
(You-wrote :eek:n "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?
 
E

Eirik Mikkelsen

Denis Nikiforov said:
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.
 
D

Denis Nikiforov

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

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.
 
D

Denis Nikiforov

(transmit-message (Hello 'Denis)
(You-wrote :eek:n "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.
 
G

gabriele renzi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top