Sunday, October 5, 2008

Where to put sqlite3.dll on Windows

When I first started using SQLite3 on Windows, most people suggested downloading sqlite3.dll from www.sqlite.org and storing it in ruby/bin so Windows could find it. For a while, this strategy worked fine but I really didn't like the application requiring users to put that DLL into an acceptable place. I don't know why it didn't occur to me earlier, but, given that this is only intended to be a Windows application, why not just modify the PATH environment variable within the application. So that's what I've done. In config/boot.rb:
# Make sqlite3.dll available
ENV['PATH'] += ";#{RAILS_ROOT}/vendor/bin/sqlite3"

1 comment :

  1. I've been to the sqlite homepage, but I don't know which files I should download to use on Windows 7 with ruby on rails. Any suggestions? Thanks.

    ReplyDelete