require ‘sqlite3’
insert into the_table values ( ‘one’, ‘two’ );
Thanks for your assistance,
John
For Windows to load shared libraries (.dll) needs to find those in any
of the directories of PATH, including the directory where the
executable (ruby.exe) is located.
Now, this is similar to LD_LIBRARY_PATH on *nix, but playing with it
is considered harmful [1]
sqlite3-ruby is built on Windows against the binary version of SQLite,
which requires the dll to be found in the PATH.
One alternative is add c:\tools\sqlite3 to the PATH:
SET PATH=%PATH%;C:\tools\sqlite3
The other alternative is put sqlite3.dll binary in the Ruby folder.
On Sun, Jan 25, 2009 at 01:03:08AM +0900, Luis L. wrote:
require ‘sqlite3/database’
#-----------------------------------------------------------
from the directory c:\tools\sqlite3?
sqlite3-ruby is built on Windows against the binary version of SQLite,
which requires the dll to be found in the PATH.
One alternative is add c:\tools\sqlite3 to the PATH:
SET PATH=%PATH%;C:\tools\sqlite3
The other alternative is put sqlite3.dll binary in the Ruby folder.
Another option is to use Amalgalite which embeds SQLite in the ruby
extension,
no need to download the sqlite3.dll separately. If you are using sqlite
directly then that is a good option. if you need to use ActiveRecord or
Sequel
or something like that, the drivers for ORM’s do not exist, yet.
enjoy,
-jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.