Upgrade to Snow Leopard gives me closed stream in rails 2.3.4

Hello
After upgrading to Snow Leopard, I get a veird error on Mysql.
The error is:
IOError (closed stream)
IOError (closed stream):
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/mysql.rb:1032:in sync=' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/mysql.rb:1032:inwrite’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/mysql.rb:1092:in finalizer' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/mysql.rb:578:incall’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/mysql.rb:578:in start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/mysql.rb:578:infree’
app/controllers/admin/booker_controller.rb:6

If I refresh the page, it will come 90% of the time (so not always).
It seems to be some kind of timeout issue.

I have done all the 64bits upgrading of MySQL.

  1. Installed the 64 bit version of MySQL
  2. Installed the gems version of mysql adapter via
    sudo env ARCHFLAGS=”-arch x86_64″ gem install mysql — –with-mysql
    config=/usr/local/mysql/bin/mysql_config

This installs, but I get this warnings on the mysql ruby install:
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1…

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

I have tried also the MAMP installed MYSQL server, so I think this is
a bug in the ruby mysql.

Any Ideas?

/MartOn

The instructions upgrading MySQL are contained in the following post:

Good luck,

-Conrad

What’s an example of a query that you’re trying to run? Your initial
e-mail
didn’tprovide any details of what you have and have not done. So, what
does
it mean
to run bigger queries so that I can try to reproduce here?

Thanks,

-Conrad

It is exactly what I have already done. And for small queries it works
perfectly. It is just when I do bigger queries that takes time I get
this “closed stream” error.

/MartOn

I tested downloading ruby 1.8.7 and compiling and installing to /usr/
local. That fixed the problem.
Now it is running ok. Not sure why…

I will try to clean out all my gems and reinstall them on the native
ruby in /usr/bin

/MartOn

So, I just tried to wipe out my gems on native ruby install and
reinstall rails and mysql.
that ended with the same “closed stream” error…
this must be a bug in the ruby version in /usr/bin.

If I switch back to the /usr/local version I just compiled everything
is working perfectly.

Any ideas on how I can do further investigation?

/MartOn

On Thu, Oct 8, 2009 at 2:42 AM, MartOn [email protected] wrote:

So, I just tried to wipe out my gems on native ruby install and
reinstall rails and mysql.

You really don’t need to remove anything because you just need to
recompile
all your native gems. Did you do this?

that ended with the same “closed stream” error…
this must be a bug in the ruby version in /usr/bin.

What query are you trying to run? What’s the size of the result-set?

If I switch back to the /usr/local version I just compiled everything
is working perfectly.

Any ideas on how I can do further investigation?

What’s an example query that you’re trying to run? Please provide the
exact statements that you’re trying to execute.

-Conrad

There is not a specific query that fails.
I know I do not have to wipe out gems. But sine I did, all gems ARE
recompiled when I test.

I also know that Snow has its built in ruby 1.8.7. Thats what I am
trying to explain here.
When I use the ruby 1.8.7 that comes with Snow, then I get this
strange MySQL error.

If I compile ruby my self, I do not get it.

That is my problem now. I can live with this, since everything is
working perfectly now using ruby from usr/local.

I just think it is strange.

/MartOn

Hi, you’ll have to reinstall all your native gems and this also include
Rubygems or you’ll have other problems. Next, I didn’t have to install
Ruby
1.8.7 because it was part of Snow Leopard. Thus, I don’t understand why
you
had to install it being that it’s the default.

-Conrad