From: Derek Seymour Date: 2011-09-12T11:09:26+09:00 Subject: why doesn't this code work? Can't find the table which I know exists in the database connection given... require 'csv' require 'rubygems' require 'sqlite3' require 'active_record' # connect to database. This will create one if it doesn't exist MY_DB_NAME = "development.sqlite3" MY_DB = SQLite3::Database.new(MY_DB_NAME) # get active record set up ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => MY_DB_NAME) #this prints out false, even though I know it exists!!!!! puts ActiveRecord::Base.connection.table_exists?("Users") # get access to a user record (in theory) class User < ActiveRecord::Base end #spits the dummy on this line cos it doesn't know what the table is puts User.count -- Posted via http://www.ruby-forum.com/.