I'm going through Simply Rails 2, and am on page 255. It is creating the users table.
I generated the model, and then created the model it said to create:
When I run db:migrate, though, I get an error:
class CreateUsers < ActiveRecord::Migration
create_table :users do |t|
add_column :stories, :user_id, :integer
add_column :votes, :user_id, :integer
remove_column :stories, :user_id
remove_column :votes, :user_id
I don't understand this error at all. I couldn't migrate down, so I deleted db/development.sqlite3 and tried again. I got the same result at the same spot.
$ rake db:migrate
== CreateUsers: migrating ====================================================
-- add_column(:stories, :user_id, :integer)
An error has occurred, all later migrations canceled:
SQLite3::SQLException: unable to open database file: VACUUM
(See full trace by running task with --trace)
I have Ruby 1.8.7, Rails 2.2.2, running on Cygwin.
Why would this be happening?