We have installed rails 1.1.2 and Ruby 1.8.4 on solaris. When we attempt
to
run the initial migration we get the following error:
Mysql::Error: Lost connection to MySQL server during query: SELECT
version FROM schema_info
/web/server/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
log' /web/server/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:185:in
execute’
/w
.etc
I can run my Windows installtion of Rails and connect to the MySql db,
no problem.
Can anyone indicate what the problem might be?
Thanks in advance,
Don Mc
Which version of the MySQL bindings are you using? Rails comes bundled
with the default Ruby MySQL bindings rather than the native ones.
I’ve found upgrading to the native ones (you really should anyone for
performance reasons) on solaris solved strange problems like this.
Alternatively move to Postgresql if you can as I’ve found it to be less
problematic.
Cheers
Jonathan
http:/www.agileevolved.com
Jonathan,
Thanks. Do you know where I could obtain the native bindings?
Regards,
Don Mc
Jonathan Conway wrote:
Which version of the MySQL bindings are you using? Rails comes bundled
with the default Ruby MySQL bindings rather than the native ones.
I’ve found upgrading to the native ones (you really should anyone for
performance reasons) on solaris solved strange problems like this.
Alternatively move to Postgresql if you can as I’ve found it to be less
problematic.
Cheers
Jonathan
http:/www.agileevolved.com
Don Mc wrote:
We have installed rails 1.1.2 and Ruby 1.8.4 on solaris. When we attempt
to
run the initial migration we get the following error:
Mysql::Error: Lost connection to MySQL server during query: SELECT
version FROM schema_info
.
.
.
Can anyone indicate what the problem might be?
Thanks in advance,
Don Mc
Your user in MySQL don’t have privileges to read de database
“schema_info”.
Doing a “gem install mysql” should do it, you may need to use the
–include parameter though depending on how you installed MySQL (via
Blastwave, source or the Sun freeware packages) as I can’t remember off
the top of my head where each of these methods install MySQL.
Cheers
Jonathan
I had the same problem.
It is definitely the SQL adapter version, as Jonathan mentioned above.
I ran “gem install mysql” , and it solved my problem.
Chau Hong Linh.