Db:test:load --- Task not supported by 'jdbcmysql'

Hi there,

we are developing a JRuby app and would like to write some proper tests
for it.
We are using MySQL as Test- and Development- Environment.

If we try to prepare the Test DB with “rake db:test:load” we get the
following error:

** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Task not supported by ‘jdbcmysql’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:384
** Execute db:test:purge
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' C:/ruby/jruby-1.4.0/lib/ruby/1.8/monitor.rb:242:inmon_synchronize’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:ininvoke_prerequisites’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ininvoke_prerequisites’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain' C:/ruby/jruby-1.4.0/lib/ruby/1.8/monitor.rb:242:inmon_synchronize’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
each' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
run' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run' C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:inload’
C:\ruby\jruby-1.4.0\bin\rake:19

Any ideas how to fix that issue?
It’s weird, but I can’t belive that testing with a MySQL DB is not
possible.

Best Regards,
Michael

I suggest using the latest activerecord-jdbc release, running the
“jdbc” generator, and changing the name of the adapter to “mysql”.
This will allow you to use the db:* tasks with JRuby. See

http://blog.nicksieger.com/articles/2009/10/12/fresh-0-9-2-activerecord-jdbc-adapter-release

for more info.

/Nick

On Wed, May 5, 2010 at 7:53 AM, Michael Schröder [email protected]
wrote:

** Invoke db:test:purge (first_time)
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
C:/ruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`top_level’


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

super, that worked, all Test’s are running now.
Thanks a lot Nick.
:smiley:

Michael

Michael Schröder wrote in post #911005:

super, that worked, all Test’s are running now.
Thanks a lot Nick.
:smiley:

Michael

May I know how were you able to run the jdbc generator in NetBeans?