I am running a 2.2.2 Rails app on top of Jruby 1.4. When I try to run
my unit tests, I get the following results:
Task not supported by 'jdbcsqlite3'
/home/tom/Dev/ruby/depot-jruby/vendor/rails/railties/lib/tasks/databases.rake:365
/opt/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call' /opt/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute’
/opt/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each' /opt/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute’
…
I therefore made the following change to my
vendor/rails/railties/lib/tasks/databases.rake file:
diff --git a/vendor/rails/railties/lib/tasks/databases.rake
b/vendor/rails/railties/lib/tasks/databases.rake
index 5cb27f1…9c3c058 100644
— a/vendor/rails/railties/lib/tasks/databases.rake
+++ b/vendor/rails/railties/lib/tasks/databases.rake
@@ -346,7 +346,7 @@ namespace :db do
ActiveRecord::Base.clear_active_connections!
drop_database(abcs[‘test’])
create_database(abcs[‘test’])
- when “sqlite”,“sqlite3”
+ when “sqlite”,“sqlite3”,“jdbcsqlite3”
dbfile = abcs[“test”][“database”] || abcs[“test”][“dbfile”]
File.delete(dbfile) if File.exist?(dbfile)
when “sqlserver”
This fixed the problem, but it really feels like a hack. Is this a bug?
Is there a better way to fix this?
Please note that I also already changed value of the the adapter
properties in my database.yml file to “jdbcsqlite3”.
Thanks in advance!
Tom Purl
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email