Instalação do Redmine - problema do conector Ruby MySQL

0

Estou tentando migrar do TRAC para o Redmine,
embora eu tenha encontrado um problema com o procedimento de instalação.

Eu sigo o guia de instalação em: link
e tudo ficou bem ...

  • criou o banco de dados da redmine (vazio) no MySQL5.5, adicionou o usuário redmine, e para testar usou 'my_password' como senha

  • copiou o mysqllib.dll do MySQL Connector/C 6.0.2 para c:\ruby193\bin como sugerido após a execução de bundle install -without rmagick

  • editado database.yml com:

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: my_password

  • , em seguida, set RAILS_ENV=production

  • quando eu tentei gerar as tabelas usando rake db:migrate
    Eu tenho o seguinte erro (additng --trace):

    C:\Program Files (x86)\redMine 2.1-stable>rake db:migrate --trace
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    rake aborted!
    Can't connect to MySQL server on 'localhost' (10061)
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:44:in 'connect'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:44:in 'initialize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in 'new'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in 'mysql2_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:309:in 'new_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:319:in 'checkout_new_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:241:in 'block (2 levels) in checkout'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in 'loop'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in 'block in checkout'
    C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in 'mon_synchronize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:233:in 'checkout'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in 'block in connection'
    C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in 'mon_synchronize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in 'connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:404:in 'retrieve_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:170:in 'retrieve_connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:144:in 'connection'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/model_schema.rb:308:in 'clear_cache!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/railtie.rb:97:in 'block (2 levels) in <class:Railtie>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:418:in '_run__792713192__prepare__98754910__callbacks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in '__run_callback'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in '_run_prepare_callbacks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in 'run_callbacks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/reloader.rb:74:in 'prepare!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/reloader.rb:48:in 'prepare!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:47:in 'block in <module:Finisher>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in 'instance_exec'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in 'run'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in 'block in run_initializers'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in 'each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in 'run_initializers'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in 'initialize!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in 'method_missing'
    C:/Program Files (x86)/redMine 2.1-stable/config/environment.rb:14:in '<top (required)>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:103:in 'require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:103:in 'require_environment!'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:295:in 'block (2 levels) in initialize_tasks'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:227:in 'call'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:227:in 'block in execute'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:222:in 'each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:222:in 'execute'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:166:in 'block in invoke_with_call_chain'
    C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in 'mon_synchronize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:159:in 'invoke_with_call_chain'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:187:in 'block in invoke_prerequisites'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:185:in 'each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:185:in 'invoke_prerequisites'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:165:in 'block in invoke_with_call_chain'
    C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in 'mon_synchronize'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:159:in 'invoke_with_call_chain'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:152:in 'invoke'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:141:in 'invoke_task'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in 'block (2 levels) in top_level'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in 'each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in 'block in top_level'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:108:in 'run_with_threads'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:93:in 'top_level'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:71:in 'block in run'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:158:in 'standard_exception_handling'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:68:in 'run'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.2/bin/rake:37:in '<top (required)>'
    C:/Ruby193/bin/rake:23:in 'load'
    C:/Ruby193/bin/rake:23:in '<main>'
    Tasks: TOP => db:migrate => environment
    

Informações sobre versões:
Windows 7 x 64 Professional
MySql 5.5.4
Conector MySql / C 6.0.2
rubi -v = > ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
gem -v = > 1.8.24

  • Testei o login usando o MySQL Workbench ... funcionando corretamente.

Por favor, ajude, o que devo verificar?

    
por Tomer W 25.11.2012 / 19:02

1 resposta

0

Bem, é só gozar incrível!
ya, um zangado comigo mesmo postar:)

depois de 1 hora lutando para encontrar uma solução, eu posto esta questão ...

5 minutos depois de postar essa pergunta, vejo a solução no StackOverflow ...
link

Just not use localhost
but use 127.0.0.1 instead !

linda ... eu me sinto tão burra ... mas é melhor vir desse jeito ...
Espero que ninguém precise lidar com isso mais: ~)

    
por 25.11.2012 / 19:11