summaryrefslogtreecommitdiffstats
path: root/lib/tasks/ci.rake
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-11-10 00:19:17 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-11-10 00:19:17 +0000
commit882c4495c08b5e4530c9a2b0073c8d0618678c00 (patch)
tree4fc2205f566c190737806fedc33a1bb10c0f7aa8 /lib/tasks/ci.rake
parent303fdc2913690a2b83b8e0cb33c9407fa08b66e4 (diff)
downloadredmine-882c4495c08b5e4530c9a2b0073c8d0618678c00.tar.gz
redmine-882c4495c08b5e4530c9a2b0073c8d0618678c00.zip
work around "rake db:create:all" error on JRuby SQLite3
<pre> $ bundle exec rake ci --trace ... rake aborted! stack level too deep /home/xxxx/.rvm/gems/jruby-1.7.4/gems/activerecord-3.2.15/lib/active_record/railties/databases.rake:184:in `local_database?' /home/xxxx/.rvm/gems/jruby-1.7.4/gems/activerecord-3.2.15/lib/active_record/railties/databases.rake:52:in `(root)' org/jruby/RubyHash.java:1375:in `each_value' /home/xxxx/.rvm/gems/jruby-1.7.4/gems/activerecord-3.2.15/lib/active_record/railties/databases.rake:38:in `(root)' </pre> git-svn-id: http://svn.redmine.org/redmine/trunk@12256 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks/ci.rake')
-rw-r--r--lib/tasks/ci.rake5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake
index df6299560..ab7eb2341 100644
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -13,7 +13,10 @@ namespace :ci do
task :setup do
Rake::Task["tmp:clear"].invoke
Rake::Task["log:clear"].invoke
- Rake::Task["db:create:all"].invoke
+ database = ENV['DATABASE_ADAPTER']
+ unless Object.const_defined?(:JRUBY_VERSION) && database =~ /sqlite3/
+ Rake::Task["db:create:all"].invoke
+ end
Rake::Task["db:migrate"].invoke
Rake::Task["db:schema:dump"].invoke
Rake::Task["test:scm:setup:all"].invoke