Rake db:test:clone_structure and related tasks fail

Judging by the exception’s location, the test environment config is
not getting loaded. Do I need to do something else to activate this
environment?

341 case abcs[“test”][“adapter”]
342 when “mysql”
343 ActiveRecord::Base.establish_connection(:test)
344 ActiveRecord::Base.connection.recreate_database(abcs
[“test”][“database”], abcs[“test”]) # wrong number of arguments (2 for
1)

Here is the test dict in my database.yml:

test:
adapter: mysql
database: review_test
username: review
password: review
host: 127.0.0.1
port: 3306
encoding: utf8

Here is the trace:

% rake db:test:clone_structure –
trace
(in /var/www/rails_apps/review_app)
** Invoke db:test:clone_structure (first_time)
** Invoke db:structure:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:structure:dump
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
rake aborted!
wrong number of arguments (2 for 1)
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:
344:in `recreate_database’

Thanks!
Thomas

rake aborted!
wrong number of arguments (2 for 1)
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:
344:in `recreate_database’

Thanks!
Thomas

do you have test database created ?

It appears that this is coming from my installed lib/mysql_adapter.rb
which has an incorrect signature for recreate_database (and probably
for other methods as well), so I think I have what I need to solve the
problem now.

Thomas

On Aug 28, 3:23 am, Nik C. [email protected] wrote:

Posted viahttp://www.ruby-forum.com/.
Yep, I do. I tried it with the MySQL test db initially (user: test,
pw: “”) and that failed with the same error. I’m able to connect to
either database both via the MySQL client and Ruby.

Thomas