Displaying 20 results from an estimated 67 matches for "session_stor".
Did you mean:
session_store
2012 Mar 02
3
Generating new application creates a few syntactically bad files in Rails 3.2.1
Running "rails new yourapplicationname" creates all the requisite files,
however two of them have bad syntax.
session_store.rb
is:
YourApplicationName::Application.config.session_store :cookie_store, key:
''_yourapplicationname_session''
should be:
YourApplicationName::Application.config.session_store :cookie_store, :key
=> ''_yourapplicationname_session''
wrap_parameters.rb
i...
2009 Jun 19
1
config.action_controller.session_store = :active_record_store
...new to Rails and learning rails reading ebook ''Agile web
development using rails''. I am doing samples given in this book
chapter by chapter.
but I stuck when I come to Sessions chapter, they have given that to
enable session to be Database based the line
config.action_controller.session_store = :active_record_store is to be
uncommented from config/environment.rb file. but I am not able to
locate this line in my environement.rb file, What can be happened with
my setup ??
Please help......
I am using Redhat Ent 4 with Ruby 1.8.6 and rails 2.3.2
2011 May 19
3
Cookie Overflow at CSV import
...eady created in my delayed_jobs table.
The code below is copied from other threads, so I don''t really know
where I save something in cookies. I guess it is at ''file.tempfile'' in
the controller, but I am not sure.
How can I avoid that error? I found something about using
session_store instead of cookie_store, but I don''t know how to do
that.
I have the following in my controller:
file = params[:file]
CSV.new(file.tempfile, {:headers => false, :col_sep => ";"}).each
do |row|
@list << row[1]
end
end
and this in my view...
2010 Oct 15
2
how to list all sessions?
I have created ActiveRecord session store in a rails 3 project:
> rake db:sessions:create
> rake db:migrate
then
Myapp::Application.config.session_store :active_record_store, :key =>
''_myapp_session''
in initializers/session_store.rb and it all works.
Now the question: how do I list ALL active sessions?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To pos...
2009 Feb 19
1
Switching to ActiveRecord Session Store
I''m having a problem switching from cookie sessions (the default) to
active record sessions.
I''ve created the sessions table via the rake task, uncommented the
line
config.action_controller.session_store = :active_record_store
in my environment.rb file, cleared out my browsers cookies, restarted
the server (natch), but still the it''s using cookie_store instead of
active_record store. Just to be sure, I added puts statements in the
initializer block of each separate store''s ruby...
2006 Aug 19
3
memcache-client working for anyone?
...etup from environment.rb initialize:
CACHE = MemCache.new :c_threshold => 10_000,:compression =>
true,:debug => false,:namespace => ''foo'',:readonly => false,:urlencode
=> false
CACHE.servers = ''localhost:11211''
config.action_controller.session_store = :mem_cache_store
config.action_controller.fragment_cache_store = CACHE, {}
Incidentally, the session store works with memcache-client, but the
fragment cache craps out. I''ve tried every method on every blog entry
out there that I could find, but they are inconsistent with the rails...
2008 Jul 08
7
script/server error
...::Session::ActiveRe
cordStore (NameError)
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_con
troller/session_management.rb:26:in `const_get''
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_con
troller/session_management.rb:26:in `session_store=''
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
initializer.rb:
455:in `send''
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
initializer.rb:
455:in `initialize_framework_settings''
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rai...
2007 Nov 07
2
merb 0.4.0 session issue
...erb edge fine a few days ago. Last night I went to
merb 0.4.0 via gem install and now any call to session[:foo] causes an
error >> undefined method ''[]'' for nil:NilClass
I have uninstalled and reinstalled merb with no luck.
dependencies.rb
use_orm :activerecord
merb.yml
:session_store: active_record
Gems
merb 0.4.0
merb_activerecord 0.4.2
Mac OSX
Any help appreciated.
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
...r.rb:41:in `form_tag''
vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb:
204:in `form_for''
app/views/users/new.fbml.erb:2:in
`_run_erb_47app47views47users47new46fbml46erb''
I''ve got this in my application.rb:
config.action_controller.session_store = :active_record_store
config.action_controller.session = {
:session_key => ''_app_session'',
:secret => ''xxx''
}
What''s the trick for getting around this?
Thanks,
BJ Clark
2009 May 12
2
rails 2.3.2 is not generating environment.rb properly
problem: rails 2.3.2 is not generating
config.action_controller.session_store = :active_record_store in
environment.rb
this is the code in environment.rb
---------------------------------------------------------------------------
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM...
2007 Apr 23
3
mongrel in production not using AR Sessions
Hello,
For some reason when i change the "environments" line in
mongrel_cluster.yml to use production, ActiveRecord Sessions stop working.
Changing this line to development yield the correct result. Entries in
database.yml are correct, and confirmed that the sessions table exists in
both environments and that production is indeed working
(production.logbeing filled up).
Any idea why
2010 May 04
2
Session Store Issues on Production Server
...hing is great on
my development server. When I upload to my passenger driven
production server at Dreamhost, the sessions are persisting
relentlessly. In other words, a user cannot log out. I have tried
implementing the Active Record session store and have changed
the :secret key in initializers/session_store.rb, but for some reason,
it is not resetting my users. Another interesting note is that in the
Appplication Controller if I force current_user_session to return
false, the user is logged out (of course). The problem seems to be
coming from user_session.delete.
Has anyone encountered this before...
2006 May 17
3
Session in ActiveRecordStore
...he Agile book seems to say I should specify this as follows, probably in the
environments.rb:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
CGI::Session::ActiveRecordStore
BUT the environments.rb file would have me Un-Comment this:
config.action_controller.session_store = :active_record_store
Anyway, I''ve tried both, and in both cases it generates new sessions all too quickly, so
that no page sees the same session as the page before it. The sessions appear in the
database. But as far as rails is concerned it only reads blank virginal sessions over an...
2006 May 14
1
session memcache expire
hi all
how to expire session in memcache session_store
regards
--
Posted via http://www.ruby-forum.com/.
2006 Mar 15
2
Session (stored in db) not working in testing mode
Hi,
I just switched from storing my sessions on disk to storing them in
MySQL. Changing environment.rb ''config.action_controller.session_store =
:active_record_store''. But now all my tests fail. I get the following
error:
1) Failure:
test_authorized_new(AdControllerTest)
[c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/depr
ecated_assertions.rb:23:in `assert_session_has''
./functional...
2009 Jun 22
2
protect_from_forgery with db-session (Rails 2.3.2)
I try to use db-session with protect_from_forgery.
But I always get a error msg:
ActionController::InvalidAuthenticityToken.
application_controller.rb
protect_from_forgery #:secret => ''top_secret''
session_store.rb
ActionController::Base.session_store = :active_record_store
hope you can help me.
Best regards
--
Posted via http://www.ruby-forum.com/.
2009 Aug 04
0
Active record sessions 2.3.3
Hi,
I am trying to store the session in db and i followed these steps
a.) rake db:session:create
b.) db migrate --> this created the table. I see the table in the db
now.
c.) Uncommented the ActionController::Base.session_store
= :active_record_store line in session_store.rb file in initializers.
I get no records in the db and also - if i do debug session --- i see
no id. ANy ideas what i could be missing? I recently switched to 2.3.3
and this is the first time i am trying to set up an activerecord
session table in it....
2010 May 31
1
Flash not deleting with Redis/Memcache store
I''m a recent convert to Rails and I''m working on a new project using Rails 2.3 (I''ll probably upgrade at some point when Rails 3 is in production and had a chance to bake the .0 bugs out). I''m going to use Redis anyway for caching important data, so I thought I''d use the redis-store:
http://github.com/jodosha/redis-store
But it appears the flash
2007 Sep 07
2
memcached and fragment storage, session storage with a mongrel cluster
...extensively. I decided to try out memcached for both to
see if I could achieve a meaningful performance gain for a particular
app.
I searched around a bit and simply added two lines to my
development.rb:
config.action_controller.fragment_cache_store = :mem_cache_store
config.action_controller.session_store = :mem_cache_store
(I also changed config.action_controller.perform_caching = true for
testing )
This works like a charm on my development box. (Mac) I''ve got
memcached -vv
running in another terminal window I can see it doing it''s thing.
However, as soon as I tried this on...
2013 Jul 14
2
Rails 4: Session Expiry?
...they
give a fix for it for database-based sessions (which are now deprecated,
apparently).
I''m really confused. I want to be able to prevent an attacker from getting
a cookie that gives him permanent access to my login-protected site.
Obviously I can set :expire_after in initializers/session_store.rb, but
unless I''m wrong that simply sets the expiration of the cookie which is
client-side and easily altered by an attacker so the session can live
forever. Of course I can make things better by forcing SSL, using secure
cookies, and forcing HTTP only, but this will never be a compl...