Showing posts with label sqlite3. Show all posts
Showing posts with label sqlite3. Show all posts

Saturday, February 28, 2009

Permission denied - db/test.sqlite3

I'm investigating creating a plugin for Redmine and having a good old time when I decide to clear out the test database:

C:\dev\redmine>rake db:test:purge
(in C:/dev/redmine)
rake aborted!
Permission denied - db/test.sqlite3

Boo! 

I don't know what made me think of it but I tried unsetting my RAILS_ENV environment variable (I had it set to "test"):

C:\dev\redmine>set rails_env=

C:\dev\redmine>rake db:test:purge
(in C:/dev/redmine)

C:\dev\redmine>

Hurrah!

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"