Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed database table creation in plugin mode

  • Loading branch information...
commit ba0754d686013fde5ec2122d8695bcc448f0d650 1 parent d73c0a1
Alex Lebedev authored
View
6 subscription_management/tasks/schema.rb
@@ -38,10 +38,14 @@
connected = false
begin
begin
+ Rake::Task[:environment].invoke
connected = true if ActiveRecord::Base.connection
rescue ActiveRecord::ConnectionNotEstablished
+ # ignore
+ rescue RuntimeError
+ puts "no database configuration found"
end
- rescue NameError # ActiveRecord not loaded
+ rescue NameError # ActiveRecord not loaded, use test mode
end
require File.dirname(__FILE__) + "/../test/connection" unless connected
end
View
6 tracker/tasks/schema.rb
@@ -54,10 +54,14 @@
connected = false
begin
begin
+ Rake::Task[:environment].invoke
connected = true if ActiveRecord::Base.connection
rescue ActiveRecord::ConnectionNotEstablished
+ # ignore
+ rescue RuntimeError
+ puts "no database configuration found"
end
- rescue NameError # ActiveRecord not loaded
+ rescue NameError # ActiveRecord not loaded, use test mode
end
require File.dirname(__FILE__) + "/../test/connection" unless connected
end
Please sign in to comment.
Something went wrong with that request. Please try again.