Hi, noob here.
I'm running my shovell app on OS X 10.4 and $sqlite3 --version results in: 3.5.8
Edit: I found a script that gets run in the script/console:
Supposedly it tells me which version of sqlite3 my rails app is attached to... it spit out 3.1.3, not the 3.5.8 that I get from the command line. aaaahhhhhh!?!?!Code:require 'rubygems' require 'sqlite3' db = SQLite3::Database.new('db/development.sqlite3') puts db.execute('select sqlite_version()')
/Edit
I've uninstalled and reinstalled sqlite3-ruby-1.2.2
In chapter 8, I discovered a problem while trying to test the functionals. I originally thought it was a problem with my test database and ended up following instructions on Justin French’s site - justinfrenchdotcom/ + index.php?id=232 - to recreate my databases, where I discovered the issue was related to my migrations. Ifigured the problem was due to the migration on page 255, requesting the addition of columns to the existing tables...
rake db:migrate resulted in:Code:add_column :stories, :user_id, :integer add_column :votes, :user_id, :integer
Code:-- add_column(:stories, :votes_count, :integer, {:default=>0}) rake aborted! SQLite3::SQLException: near "ADD": syntax error: ALTER TABLE...
I got around this problem by removing the add_column code and having them established in the original migrations, which were rebuilt using Justin’s code. Nice fix but then I ran into the same issue on page 306 when adding the votes_count column for the counter cache function.
$rake db:migrate resultes in:
From what I find elsewhere, people refer to this problem for older versions of Sqlite and it’s ruby gem. but mine seem to be up to date. not really sure where to go from here. Please help.Code:== 4 AddCounterCacheToStories: migrating ====================================== -- add_column(:stories, :votes_count, :integer, {:default=>0}) rake aborted! SQLite3::SQLException: near "ADD": syntax error: ALTER TABLE stories ADD "votes_count" integer DEFAULT 0 (See full trace by running task with --trace)



Bookmarks