我試圖用Ruby訪問基本的SQLite數據庫,但不斷收到一個奇怪的錯誤。寶石安裝沒有一個錯誤,我有適當的錯誤,但是當我嘗試實際運行的代碼,我得到這個錯誤:Ruby SQLite數據庫初始化
/home/--/.rvm/gems/ruby-2.0.0-p195/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:91:in `initialize': near ".": syntax error (SQLite3::SQLException)
from /home/mastelj/.rvm/gems/ruby-2.0.0-p195/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:91:in `new'
from /home/mastelj/.rvm/gems/ruby-2.0.0-p195/gems/sqlite3-1.3.7/lib/sqlite3/database.¦rb:91:in `prepare'
from /home/mastelj/.rvm/gems/ruby-2.0.0-p195/gems/sqlite3-1.3.7/lib/sqlite3/database. rb:134:in `execute'
^G Get Hel^O WriteOu^R Read Fi^Y Prev Pa^K Cut Tex^C Cur Pos from to_sqlite.rb:5:in `<main>'
計劃
require 'sqlite3'
db = SQLite3::Database.open('test.db')
rows = db.execute(".tabes")
for i in 0..rows.size-1
puts rows[i]
end
任何想法,以什麼可能導致此?