augustf / rails-fast-sessions

Automatically exported from code.google.com/p/rails-fast-sessions
0 stars 0 forks source link

Fails in 2.3 with sqlite3 #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install plugin as directed in the notes until you get to rake db:migrate 

What is the expected output? What do you see instead?
expected result is for rake db:migrate to produce a table

Instead

SQLite3::SQLException: near "UNSIGNED": syntax error:             CREATE
TABLE fast_sessions (

              session_id_crc INT(10) UNSIGNED NOT NULL,
              session_id VARCHAR(32) NOT NULL,
              updated_at TIMESTAMP NOT NULL,
              data TEXT,

              UNIQUE KEY `session_id` (session_id_crc, session_id),
              KEY `updated_at` (`updated_at`)
            ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adap
ters/abstract_adapter.rb:212:in
`log'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adap
ters/sqlite_adapter.rb:157:in
`execute'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adap
ters/sqlite_adapter.rb:402:in
`catch_schema_changes'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adap
ters/sqlite_adapter.rb:157:in
`execute'
/home/family/NetBeansProjects/baseapp23/vendor/plugins/fast-sessions/lib/fast_se
ssions.rb:70:in
`create_table!'
./db/migrate//20090414170317_add_fast_sessions.rb:13:in `up_without_benchmarks'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:28
2:in
`send'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:28
2:in
`migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:28
2:in
`migrate'
(__DELEGATION__):2:in `__send__'
(__DELEGATION__):2:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:48
6:in
`migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:56
0:in
`call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:56
0:in
`ddl_transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adap
ters/abstract/database_statements.rb:136:in
`transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb
:182:in
`transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:56
0:in
`ddl_transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:48
5:in
`migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:47
2:in
`each'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:47
2:in
`migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:40
0:in
`up'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migration.rb:38
3:in
`migrate'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/databases.rake:116
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

What version of the product are you using? On what operating system?
Most recent version of fast-sessions as of 4/14/09 rails 2.3 ruby 1.8.7 on
Ubuntu

Please provide any additional information below.
Using   GI::Session::ActiveRecordStore::FastSessions.fallback_to_old_table
= true

Would result in the following error
uninitialized constant CGI::Session

Original issue reported on code.google.com by toddqmil...@gmail.com on 14 Apr 2009 at 5:36

GoogleCodeExporter commented 9 years ago
"CGI::Session::ActiveRecordStore has been replaced by 
ActiveRecord::SessionStore" -- 
http://guides.rubyonrails.org/2_3_release_notes.html

Just change all reference of CGI::Session::ActiveRecordStore to 
ActiveRecord::SessionStore, and make sure that 
fast_sessions.rb is changed to reflect this ( I found that I needed to use 
"module" instead of "class" for 
ActiveRecord)

Original comment by thevalen...@gmail.com on 28 May 2009 at 3:55