I tried accessing my Rails database from other script:
require 'sqlite3'
db = SQLite3::Database.new "~/Documents/PROJECTS/Ruby/Rails/Vulnerable_Informer/db/development.sqlite3"
db.execute 'SELECT * FROM computers' do |row|
puts "#{row}"
end
But I have an error:
test_db.rb:5:in `initialize': unable to open database file (SQLite3::CantOpenException)
from test_db.rb:5:in `new'
from test_db.rb:5:in `<main>'
If I create a new SQLite3 file all works, but if I try to access an existing Rails database it fails.