Ticket #177 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Sequel Sessions is not reflected in DB

Reported by: ra..@iprobot.com Assigned to:
Priority: major Milestone: 0.4
Component: Plugin: Sequel Keywords: sequel sessions
Cc:

Description

Running :session_store: sequel # no joy Running :session_store: active_record # do reflect in DB

Please verify ...

Attachments

sequel_sessions_table.diff (1.3 kB) - added by jam..@plainprograms.com on 09/19/07 19:32:37.
Patch to Create Sessions Table for Sequel
sequel_sessions_module_fix.patch (7.7 kB) - added by jam..@plainprograms.com on 09/20/07 06:37:30.
Removes a module declaration that was blocking sessions from appearing in database.

Change History

09/13/07 16:30:27 changed by ra..@iprobot.com

Running :session_store: sequel # no joy
Running :session_store: active_record # do reflect in DB

09/16/07 01:57:48 changed by jon.egil.stra..@gmail.com

  • status changed from new to closed.
  • resolution set to invalid.

Dear raid

You need to describe your errors more closely. Please read http://www.chiark.greenend.org.uk/~sgtatham/bugs.html (among others) and restate your bugreport.

Until then, I invalidate this ticket. By that I am not saying your error is invalid, it might be very real and I thank you for reporting it, but the report per se is not up to par. Please appreciate that precise reporting is needed for this (potential) bug to be removed. When you redescribe the bug, just reopen the ticket.

All the best. Jon Egil Strand

09/16/07 10:34:52 changed by ra..@iprobot.com

  • keywords set to sequel sessions.
  • priority changed from medium to critical.
  • status changed from closed to reopened.
  • resolution deleted.

Ahhhh formal Diligent way to reproduce :

Lets create a merb skeleton app with sequel ORM plugin support.

svn co http://svn.devjavu.com/merb/trunk merb_svn
cd merb_svn
svn info
Revision: 640

rake install

cd ..
merb -g sequelsessionstestfordilligentMERBers
svn co http://svn.devjavu.com/merb/plugins/merb_sequel merb_sequel_svn
cd merb_sequel_svn
rake gem
gem install pkg/gem -i {your-path-to}/sequelsessionstestfordilligentMERBers/deps

cd {into-your}/sequelsessionstestfordilligentMERBers

mate . # or open your favorite editor
edit file config/database.yml to reflect your liking
edit file config/dependencies.rb to include dependency "merb_sequel"
edit file config/merb.yml to use :session_store: sequel

create file models/sessions.rb with http://pastie.caboo.se/97690 code
create file controllers/sessionstest.rb with http://pastie.caboo.se/97688 code

back in console cd to lib svn co http://svn.devjavu.com/merb/apps/marble/trunk/lib/

finally You can now cd .. back to sequelsessionstestfordilligentMERBers and issue

merb

finally browse to localhost:4000

then browse to localhost:4000/set_session

use back button => evaluate ... reload => evaluate ...

The above is from memory more or less YMMV ...

Cheers ...

09/16/07 10:43:46 changed by ra..@iprobot.com

09/16/07 10:55:24 changed by ra..@iprobot.com

you can use this magic_scaffold.rb to not have to set routes
http://pastie.caboo.se/97695

09/16/07 13:19:30 changed by ra..@iprobot.com

Another tool for instant visual feedback :

http://pastie.caboo.se/97744

09/17/07 08:23:16 changed by ra..@iprobot.com

updated --Another tool for instant visual feedback : --

http://pastie.caboo.se/97914

09/19/07 19:32:37 changed by jam..@plainprograms.com

  • attachment sequel_sessions_table.diff added.

Patch to Create Sessions Table for Sequel

09/19/07 19:32:44 changed by jam..@plainprograms.com

I've attached a patch that creates the necessary sessions table when one doesn't exist. It only gets triggered when the appropriate config properties are set. So if you aren't using Sequel for sessions then it won't autocreate the table.

09/19/07 19:36:41 changed by e.@brainspl.at

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [659]) patch for creating sessions table in merb_sequel, closes #177

09/20/07 06:09:00 changed by ra..@iprobot.com

  • priority changed from critical to major.
  • status changed from closed to reopened.
  • resolution deleted.

Very good to create session table if it do not exist . but sessions are still not stored in the session table and therefore using sequel sessions is not functional.

09/20/07 06:37:30 changed by jam..@plainprograms.com

  • attachment sequel_sessions_module_fix.patch added.

Removes a module declaration that was blocking sessions from appearing in database.

09/20/07 06:40:19 changed by jam..@plainprograms.com

It appears that this patch now fixes the problem sessions appear in my table now.

09/20/07 11:01:46 changed by ra..@iprobot.com

thanxs james

added require "base64" to Your diff at the top of the sequel_session.rb file ...

now i have sessions in my session table ...

again thanxs

09/21/07 13:29:11 changed by duane.johns..@gmail.com

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [668]) Fixed merb_sequel plugin (thanks James) [closes #177]