Test:units error

I am rails newbie and studying jruby on rails (rails3).

I have written some simple sample program and test using “rake
test:units”, but error occurred

For MySQL, I use activerecord-jdbc-adapter (0.9.7)


(in D:/work/study/rails/shoplet)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Invoke test:units (first_time)
** Invoke test:prepare (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
rake aborted!
Command failed with status (127): [C:/jruby-1.5.3/bin/jruby.bat
-I"lib;test" …]
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in sh' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:incall’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in
sh' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1098:insh’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in
ruby' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1098:inruby’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/test_unit/testing.rake:26:in
define' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:inverbose’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/test_unit/testing.rake:11:in
define' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain’
C:/jruby-1.5.3/lib/ruby/1.8/monitor.rb:191:in mon_synchronize' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' ** Execute test:prepare C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach’
** Execute test:units
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in `load’
C:\jruby-1.5.3\bin\rake:19

I have replaced activerecord-jdbc-adapter to
activerecord-jdbcmysql-adapter and jdbc-mysql, but different error
occurred.


(in D:/work/study/rails/shoplet)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Invoke test:units (first_time)
** Invoke test:prepare (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
rake aborted!
ActiveRecord::ActiveRecordError: Incorrect database name ‘’: DROP
DATABASE IF EXISTS ``
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:202:in
log' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.7-java/lib/active_record/connection_adapters/jdbc_adapter.rb:582:inexecute’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.7-java/lib/jdbc_adapter/jdbc_mysql.rb:186:in
drop_database' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.7-java/lib/jdbc_adapter/jdbc_mysql.rb:170:inrecreate_database’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/railties/databases.rake:432
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/1.8/monitor.rb:191:inmon_synchronize’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:ininvoke_prerequisites’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ininvoke_prerequisites’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/1.8/monitor.rb:191:inmon_synchronize’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/railties/databases.rake:460
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/1.8/monitor.rb:191:inmon_synchronize’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:ininvoke_prerequisites’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ininvoke_prerequisites’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/1.8/monitor.rb:191:inmon_synchronize’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:ininvoke_prerequisites’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ininvoke_prerequisites’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/1.8/monitor.rb:191:inmon_synchronize’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
each' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
run' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run' C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/jruby-1.5.3/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:inload’
C:\jruby-1.5.3\bin\rake:19

“Incorrect database name ‘’” But I have created database for test in
MySQL in advance.

I use windows 7 64bit and 32bit javase for jruby and 32bit MySQL.

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