XP + MySQL + Rails = migration weirdness?

Hello.

It seems I have come into uncommon situation here.

I and my fellow dev have probably almost identical machines in terms of
OS, SQLD, Ruby, Rails and gems…

However, where in my system everything works fine, he experiences weird
errors while migrating database.

c:\busiu>rake db:drop:all
(in c:/busiu)

c:\busiu>rake db:create:all
(in c:/busiu)

c:\busiu>rake db:migrate
(in c:/busiu)
rake aborted!
Mysql::Error: Commands out of sync; you can’t run this command now: SHOW
TABLES

(See full trace by running task with --trace)

As you can see, the schema_info is bringing us trouble, but I have
absolutely no ideas what is happening out there.

Perhaps anyone had similar experience and could share his wisdom? :slight_smile:

Some debugging info is below:

c:\busiu>gem list --local

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activeresource (2.0.2)
activesupport (2.0.2)
cgi_multipart_eof_fix (2.5.0)
erubis (2.6.2)
fxri (0.3.6)
fxruby (1.6.12)
gem_plugin (0.2.3)
hpricot (0.6)
log4r (1.0.5)
mongrel (1.1.5)
mysql (2.7.3)
packr (1.0.2)
rails (2.0.2)
rake (0.7.3)
rmagick (2.5.0)
rubygems-update (1.2.0)
sources (0.0.1)
win32-api (1.0.4)
win32-clipboard (0.4.3)
win32-dir (0.3.2)
win32-eventlog (0.4.6)
win32-file (0.5.4) -
win32-file-stat (1.2.7)
win32-process (0.5.3)
win32-sapi (0.1.4)
win32-sound (0.4.1)
win32console (1.1.0)
windows-api (0.2.0)
windows-pr (0.7.2)

c:\busiu>mysql --version
mysql Ver 14.12 Distrib 5.0.51b, for Win32 (ia32)

c:\busiu>ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

“Mysql::Error: Commands out of sync; you can’t run this command now:
SHOW
TABLES”

apparently the sql command “show tables” is being called
inside your migration, perhaps that is the problem.

PP Junty wrote:

apparently the sql command “show tables” is being called
inside your migration, perhaps that is the problem.

But on other development machine migration runs successfuly…

mysql的 libmySQL.dll 文件问题,现在我用的mysql5.122的,在网络上下载了一个老版本的libmySQL.dll 文件,
把它复制到mysql/bin,ruby/bin下面,问题就好哦
On 7月14æ—¥, 上午4æ—¶25分, ArtÅ«ras Å lajus [email protected]

I have encountered the same problem, and came across a solution is:
copy another edition of “libmysql.dll” to C:\Ruby\bin
and it works, the dll which works for me is the one from php latest
download
1.98 MB (2,076,672 bytes)
the latest mysql contains one which does not seem to work with rake

C:\ror>mysql --version
mysql Ver 14.14 Distrib 5.1.30, for Win32 (ia32)

C:\ror>ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

On Jul 14, 9:48 am, Artûras Ðlajus [email protected]

Try to use MySql with version 4.1 and 5.0.