Previously we’ve used Rails2.xx with no problems and we’re trying to
upgrade to ruby 1.9.2p180 and Rails 3.0.7 with pik to keep ruby
versions separate.
After some initial difficulties with MySql2 gem installation,
following these tips got mysql2 v0.2.7
installed.
My problem is that mysql2 hangs whenever I invoke it. For instance,
rake db:create never finishes.
Similarly, “rake db:migrate” and “rails console” also hang.
In all cases, if I kill the hung process, there is a stack trace that
shows basically the same hung location:
(in C:/Projects/Rails3/xxx)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate —this never finishes.
^C
C:…some…path…/mysql2_adapter.rb:312:in query' C:..some..path../mysql2_adapter.rb:312:in
execute’
C:…some…path…/mysql2_adapter.rb:629:in configure_connection' <snip> C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in
run’
C:/Ruby192/bin/rake:31:in `’
I’ve checked the Gemfile and run bundle install.
Here is a snippet from the database.yml
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: xxx_schema_name_xxx
pool: 5
username: xxuser
password: xxpwd
host: xxx_dev.devhost.com
port: 3306
I have reconfigured this for a db local on my PC and for a remotes db-
server. Both of those databases respond normally to commandline mysql
monitor and to MySql Workbench.
The tests with sqlite3 databases work fine.