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

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

Here is the test dict in my database.yml:

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

Here is the trace:

% rake db:test:clone_structure –
(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)
344:in `recreate_database’


rake aborted!
wrong number of arguments (2 for 1)
344:in `recreate_database’


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.


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.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs