Permalink
Browse files

Require active_support and active_record by name in LOAD_PATH instead…

… of gem name (deprecated)
  • Loading branch information...
1 parent 755a7ce commit 32af162414f2e092afa004b74a0be64fa53e7834 @jeremy jeremy committed Sep 14, 2009
View
@@ -1,11 +1,11 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rubygems'
-require 'activesupport'
+require 'active_support'
require 'active_support/dependencies'
require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/core_ext/module/delegation'
-require 'activerecord'
+require 'active_record'
require 'active_record/connection_adapters/abstract/quoting'
require 'arel/algebra'
@@ -1,5 +1,6 @@
-require "activerecord"
puts "Using native MySQL"
+require "active_record"
+require 'logger'
ActiveRecord::Base.logger = Logger.new("debug.log")
@@ -1,5 +1,6 @@
-require "activerecord"
puts "Using native PostgreSQL"
+require "active_record"
+require 'logger'
ActiveRecord::Base.logger = Logger.new("debug.log")
@@ -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 @@
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}'"

0 comments on commit 32af162

Please sign in to comment.