ruby show 'Mysql::Error: MySQL server has gone away: SHOW TABLES' when run command 'rake db:migrate RAILS_ENV="production"'
Added by 鸿辉 林 over 13 years ago
hi
When I run command 'rake db:migrate RAILS_ENV="production"', it shows me a error, 'Mysql::Error: MySQL server has gone away: SHOW TABLES', any body can help me?
platform:
windows 2003 x64 R2
mysql 5.1
libmySQL.dll instead by http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll
C:\redmine-1.1.1>rake db:migrate RAILS_ENV="production" --trace
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [
args] => [deps]' instead.
at C:/redmine-1.1.1/lib/tasks/email.rake:170
- Invoke db:migrate (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute db:migrate
rake aborted!
Mysql::Error: MySQL server has gone away: SHOW TABLES
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract_adapter.rb:219:in `log'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:323:in `execute'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:439:in `tables'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/schema_statements.rb:319:in `initialize_schema_migrations_table'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/migration.rb:436:in
`initialize'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/migration.rb:400:in
`new'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/migration.rb:400:in
`up'
C:/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/migration.rb:383:in
`migrate'
C:/redmine-1.1.1/vendor/rails/railties/lib/tasks/databases.rake:116
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `inv
oke_task'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each
'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `sta
ndard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `sta
ndard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
C:/Ruby187/bin/rake:19:in `load'
C:/Ruby187/bin/rake:19
Tasks: TOP => db:migrate
C:\redmine-1.1.1>
thank you!
linhonghui