SAVEPOINT Exception With Rails 3.1 on Jenkins

- - posted in Uncategorized

1
2
ActiveRecord::StatementInvalid:
SQLite3::SQLException: near “SAVEPOINT”: syntax error: SAVEPOINT active\_record\_1

Was getting the above error, and found that I needed to upgrade CentOS default version of sqlite.  Pretty simple right?

Problems arose:

  1. CentOS packages didn’t have the newer versions. ¬†So I couldn’t use yum update.
  2. After manually building an updated version of sqlite3 from source, Jenkins was still using the old version of sqlite.
  3. Sqlite3 is dependency on a whole bunch of other CentOS packages, so I couldn’t uninstall the default sqlite3 package.

Thanks to Stackoverflow again, all I really needed to do was manually install the sqlite rubygem pointing to the updated static libraries, as per:

1
2
3
4
5
bundle config build.sqlite3 \
–with-sqlite3-include=$HOME/sqlite3.7.7.1/include \  
–with-sqlite3-lib=$HOME/sqlite3.7.7.1/lib \  
–with-sqlite3-dir=$HOME/sqlite3.7.7.1/bin  
bundle install