SQLite REGEXP initializer not working in production on Heroku
Posted
by
morcutt
on Stack Overflow
See other posts from Stack Overflow
or by morcutt
Published on 2011-03-04T23:53:12Z
Indexed on
2011/03/05
7:24 UTC
Read the original article
Hit count: 256
ruby-on-rails
|sqlite
I am using this to create a REGEXP in SQLite with rails because SQLite does not support REGEXP. When running this app on Heroku rather than the localhost it does not work. Is the initializer not being run when the app launches?
The log files are providing ..
2011-03-04T18:35:36-08:00 app[web.1]: ActiveRecord::StatementInvalid (PGError: ERROR: syntax error at or near "REGEXP"
2011-03-04T18:35:36-08:00 app[web.1]: LINE 1: ... "posts".* FROM "posts" WHERE (message REGEXP '(?...
2011-03-04T18:35:36-08:00 app[web.1]: ^
2011-03-04T18:35:36-08:00 app[web.1]: : SELECT "posts".* FROM "posts" WHERE (message REGEXP '(?:^|\s+)/(\w+)' and user_id = 1)):
Which are similar to what the development files produced if I had deleted the implemented code. It seems as though the REGEXP initializer is not being run at startup.
© Stack Overflow or respective owner