diff options
Diffstat (limited to 'spec/connections/sqlite3_connection.rb')
-rw-r--r-- | spec/connections/sqlite3_connection.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/connections/sqlite3_connection.rb b/spec/connections/sqlite3_connection.rb index 9e9503e0ca..e8eeee17d0 100644 --- a/spec/connections/sqlite3_connection.rb +++ b/spec/connections/sqlite3_connection.rb @@ -1,6 +1,6 @@ -require "rubygems" -require "activerecord" puts "Using native SQLite3" +require "active_record" +require 'logger' ActiveRecord::Base.logger = Logger.new("debug.log") @@ -16,6 +16,7 @@ ActiveRecord::Base.configurations = { unless File.exist?(db_file) puts "SQLite3 database not found at #{db_file}. Rebuilding it." + require 'fileutils' FileUtils.mkdir_p(File.dirname(db_file)) sqlite_command = %Q{sqlite3 "#{db_file}" "create table a (a integer); drop table a;"} puts "Executing '#{sqlite_command}'" |