# How to make prefix\_sessions recognizable?

**URL:** <https://www.ruby-forum.com/t/how-to-make-prefix-sessions-recognizable/101340>\
**Category:** Rails\
**Created:** [August 4, 2006, 11:02am UTC](https://www.ruby-forum.com/t/how-to-make-prefix-sessions-recognizable/101340 "2006-08-04T11:02:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arie\_Kusuma\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@Arie\_Kusuma\_A](https://www.ruby-forum.com/u/Arie_Kusuma_A)\
**Post date:** [August 4, 2006, 11:02am UTC](https://www.ruby-forum.com/t/how-to-make-prefix-sessions-recognizable/101340/1 "2006-08-04T11:02:25Z")

</div>

Hello,  
i must use prefix to each of my tables for my project right now. Now i’m  
facing this session stored in table problem.  
i don’t use rake db:sessions:create, but i use script/generate migration  
create\_myproject\_sessions  
then  
create\_table :myproject\_sessions do |t|  
t.column :myproject\_session\_id, :string  
t.column :data, :text  
t.column updated\_at, :datetime  
end  
then run rake db:migrate  
then play with it, this is the log/development.log

Mysql::Error: Table ‘mydatabase.sessions’ doesn’t exist: SHOW FIELDS  
FROM sessions  
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active\_record/connection\_adapters/abstract\_adapter.rb:120:in  
`log' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/mysql_adapter.rb:184:in `execute’  
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active\_record/connection\_adapters/mysql\_adapter.rb:292:in  
`columns' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:696:in `columns’  
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active\_record/base.rb:704:in  
`columns_hash' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/session/active_record_store.rb:103:in `setup\_sessid\_compatibility!’  
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action\_controller/session/active\_record\_store.rb:77:in  
`find_by_session_id' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/session/active_record_store.rb:281:in `initialize’  
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active\_record/base.rb:794:in  
`silence' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/session/active_record_store.rb:281:in `initialize’  
/opt/local/lib/ruby/1.8/cgi/session.rb:273:in `initialize' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/cgi_process.rb:111:in `session’  
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action\_controller/cgi\_process.rb:141:in  
`stale_session_check!' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/cgi_process.rb:107:in `session’  
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action\_controller/base.rb:887:in  
`assign_shortcuts_without_flash' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/flash.rb:141:in `assign\_shortcuts’  
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action\_controller/base.rb:375:in  
`process_without_filters' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/filters.rb:377:in `process\_without\_session\_management\_support’  
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action\_controller/session\_management.rb:117:in  
`process' /opt/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher.rb:38:in `dispatch’  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/rails.rb:73:in  
`process' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:551:in `process\_client’  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:550:in  
`process_client' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in `run’  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:636:in  
`run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:625:in `run’  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:956:in  
`run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel.rb:955:in `run’  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel\_rails:127:in  
`run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in `run’  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel\_rails:235  
/opt/local/bin/mongrel\_rails:18

how can i modify it to recognize my prefix\_sessions table ?  
please please help me. Thank you very much for your help before.

–  
Arie Kusuma A. A.K.A Arie A.K.A ariekeren / YM! = riyari3  
[http://ariekusumaatmaja.wordpress.com](http://ariekusumaatmaja.wordpress.com)  
Let’s build Ruby Indonesia stronger  
[Yahoo | Mail, Weather, Search, Politics, News, Finance, Sports & Videos](http://groups.yahoo.com/groups/id-ruby) # Indonesia Ruby Society

Dibutuhkan programmer ruby wanita aduhai cantik nan jelita lembut  
gemulai hati fisik penuh kehangatan dan semua semuanya deh buat menjadi  
pendamping setia sehidup semati ariekeren. hubungi via Yahoo Messenger  
di removed\_email\_address@domain.invalid  
Note! Hanya buat yang serius! Lebih diutamakan : Asli Paris dan punya  
jiwa dan hati -+ kek Arwen
