Displaying 20 results from an estimated 30000 matches similar to: "Turning off Sessions"
2006 Apr 30
1
Rails Sessions : Is it possible?
Is it possible to prevent sessions from being created at all?
I put session :off in my ApplicationController and something similar
in my environment.rb
I restarted everything etc. And sessions are still being created. So I
switched from pstore to mysql. Restarted. Still being created although
now it''s a bit easier to watch over.
Is there someway to completely stop it?
2006 May 12
5
how long before deleting sessions ?
What is the recommended amount of time to keep sessions around in the
database (i store them in a sessions table). IF you get 1 million requests
per day you are going to get 1 million new session entries in the DB. This
would need some serious cleaning so just wondering what a safe cleanup time
would be.
Also does anyone know how to prevent new sessions records from being created
if session
2006 Jan 13
2
file_column in session
is it possible to store a field of type file_column in the session?
Rails crashes on me every time i try to do something like the
following:
@session[:newpost] = @params[:post]
however if i assign each field of @params[:post[ except for
@params[:post]["image"] i have no problems. Is there something that
should be done to allow the file in the session?
thanks
adam
2006 May 23
2
additional fields in session DB table
I am using active record sessions and everything works fine. I am
integrating it with phpbb however so i need some extra fields populated in
the session table. In application.rb i put a before_filter to update the
session table
I have a model for the sessions
$ more app/models/session.rb
class Session < ActiveRecord::Base
set_primary_key "session_id"
set_table_name
2006 Apr 01
3
permission denied creating ruby sessions
My code was working, and I upgraded to Rails 1.1, and it seemed to be
working after that, but then I suddenly started seeing the following
error:
Permission denied -
/home/will/office/public/../config/../tmp/sessions//ruby_sess.c7da2e7df8df77df
/usr/lib/ruby/1.8/pstore.rb:289:in `initialize''
/usr/lib/ruby/1.8/pstore.rb:289:in `transaction''
2006 Feb 28
1
Oracle OraNumber problem with Authentication. Please help!
I have added an authenticator using the instructions here:
http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticate
The LoginController sets session["employee"] to an employee.
When i try to access the session["employee"] from another controller i
get this error :
"
TypeError (no marshal_dump is defined for class OraNumber):
c:/ruby/lib/ruby/1.8/pstore.rb:159:in
2006 Jan 09
5
file_column content type
is there a way using the file_column plugin to enforce a certain
content type based on regex (i.ie, /^image/) and/or filesize (150k)
?
thanks
adam
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
2006 Jun 22
0
SessionCleanup (clean up sessions within Rails app)
SessionCleanup is a routine to clear out stale sessions from within a
Rails application.
A Rails application creates a new session for every connection. Over
time, this leads to the accumulation of hundreds or thousands of stale
session files or session records (if you''re using a database). These
sessions are often cleaned out manually or by the use of a cron job.
Neither of these
2008 Apr 11
0
Active Record Sessions only work on localhost
Hi I was wondering if anyone else was having this problem or might
know why its happening.
I basically need to use AR sessions instead of the default pstore for
sessions so I did the rake db:sessions:create to get the migrate file
and then the rake db:migrate to create the session table.
Also uncommented the below line in environment.rb
config.action_controller.session_store =
2006 Feb 26
0
Ajax, MemoryStore and sessions
Have you ever worked with Ajax, memoryStore and sessions in Rails?
I''m trying to pass a value through a session variable to various methods.
I''m calling the methods with Ajax on a submit button. I do this twice on a
page. The first time I pass a variable from the page to the controller and
store it in the session and write a log entry. This works fine. When the
second button
2006 Aug 02
4
Disc quota exceeded when attempting to write session
Hi All,
When trying to write sessions file, I''m getting disc quota errors.
Looking into the sessions folder, I see:
-rw------- 1 www www 188 Aug 2 21:03 ruby_sess.d39a2c77b4750b72
-rw-r--r-- 1 www www 0 Aug 2 21:03 ruby_sess.d39a2c77b4750b72.tmp
I''m guessing the the tmp should not be there, as it does not show on
my dev setup.
I''m using rails (1.1.1)
2006 Jan 13
4
Flash not cleared with ActiveRecord session store
Cheers,
I''ve stumbled over a bug with 1.0 and ActiveRecord store for session
while migrating from pstore sessions.
I created the table with `rake create_sessions_table` and set
`config.action_controller.session_store = :active_record_store` in
environment.rb.
Everything runs fine except that the flash messages will not be cleared.
I get the same message everytime on everypage I
2006 Aug 07
5
Store SOAP::RPC::Driver in user session throws TypeError
Hi All
I have a
requirement to consume a 3rd party web service from my Rails
application. I am doing this
in my action
require ''soap/wsdlDriver''
factory = SOAP::WSDLDriverFactory.new(TRANSIDIOM_WSDL_URL)
soap = factory.create_rpc_driver
soap.wiredump_file_base="#{RAILS_ROOT}/log/transidiom.log"
param = %(<Request
2006 Feb 28
0
Help needed: Sessions and memoryStore
Hi,
I could really use some help in understanding why, when using memoryStore,
the ''new_session'' value is always set to true for every request. This isn''t
the case when using Pstore.
With the ''new_session'' = true, the data I have set in the session gets lost.
Is there a way I can set the ''new_session'' = false so I can preserve the
2006 Apr 19
3
best way to check session for nil
Hello,
What is the best way in rails to check a session hash value for nil ? I
have a session hash called user (session[:user]) that sometimes I have to
check for a certain variable like session[:user].email. however the
following always results in an error
if session[:user].email
and I always have to do
if session[:user] and session[:user].email
Is there a cleaner way to do this then
2006 Jul 13
0
error_messages_for and seperate controllers
I''ve got two controllers, let''s call one Post and the other Comment
for simplicity, i.e.:
class Post < ApplicationController
def show
...
end
end
class Comment < ApplicationController
def create
@comment ...
end
end
In my create() method I would like to redirect back to the show method
after I have saved the comment. But If I have errors in saving the
2006 Jan 27
6
Scaffolding to use has_many and belongs_to ?
What does everyone on this list think about enhancing scaffolding
somehow so that a "has_many" relationship will automatically drop the
<select> box into the view to reference the "belongs_to" part of the
view?
I think scaffolding is great but I am always adding the <select> boxes
to reference the parent association. Do you think this would be
useful? just a
2006 Sep 03
18
Recommentation: Sessions and PStore
Morning Folks,
As most of you know there were a few people who had the following three
bugs:
* CLOSE_WAIT: Lots of sockets in CLOSE_WAIT state.
* 99% CPU: Mongrel''s getting "stuck" pegged at 99% CPU.
* LEAK: Memory leak.
I''ve successfully fixed these bugs or attributed them to one main cause:
pstore.
First, the memory leak was because of a bug in how the GC in Ruby
2006 Mar 09
2
turn off auto increment
Hello,
I have an old table that handles sessions. the primary key is a field
called session_id and is the actual session id like "8df838303ufdfu838"
however when i do the following in the model:
set_primary_key "session_id"
and the following in the controller:
@session_hash = { "session_id" => @session.session_id, "session_user_id" =>