I'm experimenting with Ruby on Rails. I'm using NetBeans on Windows 7.
I am trying to follow this tutorial, but instead of using MySQL, I'd like to use SQLite3. Here is my database.yml file:
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
Whenever I try to follow these steps:
In the Projects window, right-click the rubyweblog project node, and choose Run/Debug Rake Task from the pop-up menu.
Type db in the Filter text box to narrow the task list to just the db tasks, as shown in the following figure.
Select db:create from the Matching Tasks list and click Finish. Rake creates the database for the development configuration as defined in the database.yml file. Note: If you see error messages in the Output window, verify that the user name and password in the development section in the database.yml
I get this error:
(in C:/code/rubyweblog)
rake aborted!
no such file to load -- sqlite3
I've placed the sqlite3.exe in the path referenced in the error and also have the sqlite3-ruby gem installed.
What can I try?
EDIT
My project is set to use JRuby.
UPDATE
Following BJG's answer, I am now getting this error:
(in C:/code/rubyweblog)
db/development.sqlite3 already exists
I am making sure the file is deleted before "raking", but it keeps creating it and giving me this error.