DBNAME = "data-hold/tel-directory.sqlite"
File.delete(DBNAME) if File.exists?DBNAME
DB = SQLite3::Database.new( DBNAME )
TABLE_NAME = "telephone_records"
DB_INSERT_STATEMENT = "INSERT into #{TABLE_NAME} values
(#{FIELD_NAMES.map{'?'}.join(',')})"
DB.execute "CREATE TABLE #{TABLE_NAME}(#{FIELD_NAMES.map{|f| "`#{f[0]}`
#{f[1]}"}.join(', ')});"
FIELD_NAMES.each do |fn|
DB.execute "CREATE INDEX #{fn[2]} ON #{TABLE_NAME}(#{fn[0]})" unless
fn[2].nil?
end
Dir.glob("data-hold/pages/*.html").reject{|f| f =~ /All match/}.each do
error in each do method in first line of both blocks
Why have you posted this again rather than continuing with previous
thread? As I said previously the object you are calling .each on must
be nil. Have a look at the Rails Guide on Debugging for suggestions
as to how to debug the code to find out why.