I am getting the following error using sqlite3. If I ran the same query directly in sqlite3 client, the data is saved without error. Same is happening for every table during inserts. SQLite3::SQLException: sessions.id may not be NULL: INSERT INTO sessions ("updated_at", "session_id", "data") VALUES(''2009-09-30 02:28:45'', ''3461077be365d88468352a6172c27793'', ''BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo SGFzaHsABjoKQHVzZWR7AA='') ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:139:in `log'' ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:154:in `execute'' ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:361:in `catch_schema_changes'' ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:154:in `execute'' ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:169:in `insert'' ./script/../config/../vendor/rails/activerecord/lib/active_record/base.rb:1862:in `create_without_callbacks'' -- Posted via http://www.ruby-forum.com/.
bump -- Posted via http://www.ruby-forum.com/.
On Wed, Sep 30, 2009 at 2:16 PM, John Mark <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > bumpIf you bump you should include the original question. Peeps reading your post as list-serve email are clueless otherwise. -- Greg Donald http://destiney.com/
I''d say there''s probably something wrong with your session table schema - is id declared as an autoincrement field? --Matt Jones On Sep 29, 10:34 pm, John Mark <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am getting the following error using sqlite3. If I ran the same query > directly in sqlite3 client, the data is saved without error. Same is > happening for every table during inserts. > > SQLite3::SQLException: sessions.id may not be NULL: INSERT INTO sessions > ("updated_at", "session_id", "data") VALUES(''2009-09-30 02:28:45'', > ''3461077be365d88468352a6172c27793'', > ''BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo > SGFzaHsABjoKQHVzZWR7AA=> '') > ./script/../config/../vendor/rails/activerecord/lib/active_record/connectio n_adapters/abstract_adapter.rb:139:in > `log'' > ./script/../config/../vendor/rails/activerecord/lib/active_record/connectio n_adapters/sqlite_adapter.rb:154:in > `execute'' > ./script/../config/../vendor/rails/activerecord/lib/active_record/connectio n_adapters/sqlite_adapter.rb:361:in > `catch_schema_changes'' > ./script/../config/../vendor/rails/activerecord/lib/active_record/connectio n_adapters/sqlite_adapter.rb:154:in > `execute'' > ./script/../config/../vendor/rails/activerecord/lib/active_record/connectio n_adapters/sqlite_adapter.rb:169:in > `insert'' > ./script/../config/../vendor/rails/activerecord/lib/active_record/base.rb:1 862:in > `create_without_callbacks'' > -- > Posted viahttp://www.ruby-forum.com/.