I have Ruby 2.2.2p95 on Windows. I am not using Rails. I am able to use the following to install sqlite3
gem install sqlite3
When I crate a Ruby file as follows, it fails to load sqlite3:
test.rb
require 'sqlite3'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'test.db'
)
When I run
ruby test.rb
it throws an error from the line where I have the require statement for sqlite3:
cannot load such file -- sqlite3/sqlite3_native (LoadError)
I have sqlite installed on Windows and was able to create a table in the database. Any ideas on fixing this?
Aucun commentaire:
Enregistrer un commentaire