Displaying 20 results from an estimated 6000 matches similar to: "Unwanted sessions after routing error"
2008 Feb 09
1
how to check the config.action_controller.session options ?
when setting it in my environment.rb
config.action_controller.session = {
:session_key => ''_myapp_session'',
:secret => ''3a64394bb895f1f05e0c07f71127d93d''
}
I cannot get it back in the script/console ..
:session_key=>"_session_id" !!!
why ?
>> ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
=>
2006 Jul 11
1
Dynamically setting the session domain?
Does anyone know a way to dynamically change the session_domain option
of ActionController::CgiRequest? I want to have a login section on an
index page (www.example.com) that takes a subdomain, username,
password, authenticates, then redirects to
http://#{subdomain}.mysite.com.
I need to set the session_domain option (to the subdomain) dynamically
so the cookie can be read when the user arrives
2006 Aug 03
0
Sharing sessions across subdomains
Has anyone else experienced this strange behavoir with sharing
sessions across subdomains?
I have in development.rb
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_domain
=> ''.localhost.com'')
If I create a session at foo.localhost.com then go bar.localhost.com a
session is created (with host localhost.com) and everything works
fine.
But if I then go
2006 Mar 07
0
Storing sessions files elsewhere on EdgeRails
Hi all,
In a Rails 1.0 project, I successfully changed the sessions storage
location to <RAILS-ROOT>/tmp, by adding
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:tmpdir =>
File.join(RAILS_ROOT, ''/tmp''))
in environment.rb
Problem:
--------
I tried to use the same trick in an EdgeRails project, but it doesn''t
work : server error, with no
2008 Jul 15
1
sex expire time for Sessions in memcached
Hi all,
I have a problem with expiring sessions in the case with using
mem_cache_store. I''ve been using ActiveRecord session store till now and
expired them with SQL query. Yesterday I switched to memcache for
storing sessions, however I can''t set an expireation period.
My current config is this:
========================
memcache_options = {
:c_threshold => 10_000,
2006 Feb 09
1
session cookie expiration
from the Agile Book, i see i can set the absolute session expiry time via:
ActionController::CGIRequest::DEFAULT_SESSION_OPTIONS[:session_expires]
however, I don''t see anything about what the actual default setting is when
a session is created.
also, is there a way to set the expiration to happen when the browser is
closed?
in PHP, this can be accomplished using
2006 Apr 12
1
Dealing with documentation : how to find REAL doc ?
Hi there Rails buddies !
After some weeks working with Rails and having it running on different
platforms, I definitively find the documentation not enough precise. But
those are my thoughts and I hope somebody can point my out to the good
way to find something.
For example, I currently look for information about session managment,
and find the code :
2006 May 17
3
Session in ActiveRecordStore
The 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
2006 Feb 06
0
how can I retrieve a session based on the session-id
I am trying to mix Flash and RoR (for fileupload without pagerefresh)
Unfortunately the requests originating from the flashplayer do not have the
right sessionid. So I tried to hackaround with reading the _session_id form
the cookie and sending it together with the fileupload POST from the
flashplayer to the webserver.
But how can i retrieve the session based on the session_id at my controller
2005 Aug 06
2
Problem with 0.13.1 ActiveRecordStore with PG 8.0.3.
Hi,
I put the following in my environment.rb file:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
(:database_manager => CGI::Session::ActiveRecordStore)
Runnning WEBrick via "script/server" and trying to load any page
served by a controller results in an error like the following:
#<ActiveRecord::StatementInvalid: ERROR: null value in column "id"
2008 Jun 19
5
How do you create one session cookie for multiple subdomains
I am using the restful authentication plugin and am always prompted to
login if a different subdomain is accessed. I have found a couple rails
"solutions", but none of them seem to work:
# development.rb
1. ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key]
= ".localhost"
2. ActionController::Base.session_options[:key] = ".localhost"
Does anyone
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
Hi all,
Apologies in advance if I got this one wrong, I''m still just a
newbie ;-)
Going through the Apple ADC RoR tutorial it suddenly occurred to me
that the ''number_to_currency()'' helper method was not DRY streamlined.
Scenario::
The "number_to_currency()" methods options hash works great when I
need to dynamically display different currencies when I
2006 Feb 12
0
problem serving files which start with newlines
I''m working on a rails app that stores files in a database and allows
users do download them again. But when a file starts with newlines they
get lost in the process and the browser marks the download as failed
because the received filesize is smaller then the expected filesize (the
difference is exactly the newlines missing).
To reproduce this place something like this an a
2006 Jan 30
0
cached_model-1.0.1 ActiveRecords + memcache
The new version of cached_model features bug fixes and tests!
Bugs fixed:
Updating a model no longer stores associations into the cache. This
could cause strange, hard-to-debug bugs when an invalid set of
assocations was retrieved along with a cached model.
Reloading a model refreshes the cache.
When CachedModel::find can''t understand query params and a single
result is
2005 Dec 25
1
How to use mem_cache_store?
Hi,
I''m trying to use mem_cache_store for sessions. I have installed the
server and the gem and have added the following to my
config/environment.rb:
>>>>>>>>>>>>>>>>>>>>>>>>>
memcache_options = {
:c_threshold => 10_000,
:compression => true,
:debug => false,
:namespace =>
2006 Feb 08
10
Sharing sessions between subdomains?
Hello,
I know how to share sessions between subdomains in PHP. Can anyone please guide me as to how I can share sessions using Ruby? Where can I set the value of domain for which the cookie is set?
I would like for a user to login on the home page and then go to blog.home.com and not have to login again.
Any guidance/pointers are appreciated.
Thanks''
2006 Apr 27
4
Sessions Problems
Hi to group!
I am new to ROR!
I am facing problems on sessions.
First I created the one session variable.
after that I created the other one.
after moving to three pages the session was destroyed automatically.
What is the reason please help me!
Thnaks and Regards,
-Kumar Varma
--
Posted via http://www.ruby-forum.com/.
2006 Feb 12
3
memcache-client/cached_model help
Hi -
Just downloaded and installed the memcache-client and cached_model
gems and am trying to test it out on a development setup. I added
this to my environment/development.rb
CACHE = MemCache.new :c_threshold => 10_000,
:compression => true,
:debug => true,
:namespace => ''eztrip'',
2006 Aug 16
5
too many SESSIONS?
I just notices my app was down, and in the log file were lots of these:
No space left on device -
../config/../tmp/sessions//ruby_sess.898b1cf95e14f8e3
So i figured that i had too many sessions. I went through and deleted
the sessions and then in a few minutes, the site was back up again.
Can anyone explain this?
Did I do the right thing?
Is there a way I can tell my app to accept more
2005 Dec 17
9
How to clear sessions with cron?
Anyone got a quick code snippet I can add to my crontab? Since Rails
doesn''t do any housekeeping, my /tmp directory just keeps getting fatter
and fatter. I found this useless snippet in the Agile book:
find /tmp/ -name ''ruby_sess*'' -ctime +12h -delete
Fedora Linux complains about the ''h'' in 12h, then if you remove the ''h''
he