Displaying 20 results from an estimated 6000 matches similar to: "Session not working in testing mode"
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
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
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
2006 Mar 28
0
MySQL problems and undefined class User
Hello
I''m having some issues with MySQL losing it''s connection, or undefined
class User on Windows XP. I use Login and UserEngine. Rails 1.0/1.1,
MySQL 4.
MySQL problem (one of them):
Mysql::Error: Lost connection to MySQL server during query: UPDATE
sessions SET `data` =
2008 May 21
2
Replacing ActiveRecordStore::Session with a custom model
Has anyone managed to replace ActiveRecordStore::Session with their
own model?
In the source (http://dev.rubyonrails.org/browser/trunk/actionpack/lib/
action_controller/session/active_record_store.rb) it says you can
override the default by setting
CGI::Session::ActiveRecordStore.session_class = MySessionClass
I have tried doing this in a number of ways but I get all kinds of
weird errors, as
2006 Nov 08
1
controller.session not same as session?
> context "A user logging out" do
> fixtures :users
> controller_name :account
>
> setup do
> login_as :quentin
> users(:quentin).remember_me
> request.cookies["auth_token"] = cookie_for(:quentin)
> end
>
> def logout
> get :logout
> end
>
> specify "should unset :user in session" do
2006 Jun 01
3
rake create_sessions_table, does not create session table
when i run rake create_sessions_table, I get following output. tables
donot get created and my application doesnot start.
(in G:/rubysrc/blog)
create db/migrate
create db/migrate/001_add_sessions.rb
info: the first time ran take everyting was fine, but now i have
reinstalled ruby and rails and created the database, but i am unable to
create session table with rake, please help.
2010 Jul 07
1
what is a session stored via the active_record_store option unique to?
Hi,
After a bunch of snooping in AWDWR and Railsguides I can''t reach a
good understanding to the following question: What is a session stored
via the active_record_store option unique to? In other words, how does
rails bind the user to their session under the active_record_store
option?
This concern has arisen in the following way...
...I have two use levels in my app: 1) authenticated
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 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails?
The errors are just totally over the top ugly and not helpful. First
of all the ruby -Ilib line always comes before each test and I find it
distracting. But if an error occurs on something that is not nil it
just gives me the entire contents of that object and that is no small
matter when the object is a HTTP request response.
Here is
2006 Apr 07
2
weird error with rake create_sessions_table
Hi all,
Despite switching to mod_fcgid (which has improved performance),
sessions are still expiring sporadically. I thought I might try
switching to storing them in the db, but I get the following error when
I try to run the rake create_sessions_table command
D:\User\Code\ruby\prometheus>rake create_sessions_table
(in D:/User/Code/ruby/prometheus)
rake aborted!
undefined local variable or
2010 Nov 29
3
session active_record_store
Hi,
There doesn''t seem to be any previous posts about this problem, I must
be
setting things up wrongly at very basics...
Firstly, the problem... I can''t get session[] to persist with
active_record_store. I enabled (config.action_controller.session_store =
:active_record_store) in environment.rb and created the sessions table
at my MySQL database. When I do a session[:blah] =
2010 Aug 17
1
DetachedEval Issues
Hello everyone,
I have been attempting to make use of the newly implemented detachedEval functionality and I am having a few teething issues.
My code works fine when tested with both the Client and the Server on a single machine, but issues arise when I run them separately.Possibly because the local / local connection is running voer a Unix socket rather than tcp proper?
Rsession*
2008 Dec 25
2
Switching to active_record_store session management errors out
Hello,
Running Ruby 1.8.6 and Rails 2.2.2 against an Oracle XE database
(sigh).
I just upgraded Rails from 1.2.3 to 2.2.2, which made my cookie based
system for storing session information to error out due to the 4Kb
limit. So, I tried to turn on the active_record_store system by un-
commenting out the "config.action_controller.session_store
= :active_record_store" line in
2005 Dec 14
1
Problems with testing - error posting to other controller
Hi,
I''m trying to test my ad_controller. In order to create an ad, the user
has to be logged in, so I have written a login() that logs in a valid
user and generates a session[:user_id], like:
def login (login="bob", password="atest")
post "user/login", :user => { :login => login, :password => password
}
assert_response 302 # redirect
2003 Dec 24
0
[LLVMdev] RE: repeated recursion with "frozen" arguments
<Chris is cleaning out his inbox>
Valery A.Khamenya wrote (in
http://mail.cs.uiuc.edu/pipermail/llvmdev/2003-August/000455.html):
> there is a very simple using case concerning LLVM and I am wondering
> whether it might be optimized at LLVM layer:
> int rec_func(int x, int y) {
> if(y<0) return x;
> return y + rec_func(x, y-1); // should we really push x?
> }
2008 Feb 20
2
Rails Edge ActiveSupport::TimeWithZone and Marshalled objects
Hello all,
I''m trying to use the new ActiveSupport::TimeWithZone from Edge. The
problem seems to be that I have a several-action process to create a
Booking. This Booking is stored in the session (session[:booking] =
@booking) throughout the actions until the last action is reached and
the record is saved to the DB.
Using TimeWithZone seems to be producing errors when trying to
2006 Feb 14
1
ArgumentError in <controller not set>#<action not set> ??
Has anyone ever seen this before? It doesn''t happen n a predictable
manner, and can occur via different controllers. Someone else posted
about this back in December but no one replied. I''m completely stumped!
Here is the text, thanks.
ArgumentError in <controller not set>#<action not set>
undefined class/module CustomerDomain
RAILS_ROOT: script/../config/..
2006 Jan 04
3
Intermittent problem with link_to_remote()
Hi folks,
My page displays links for ''categories'' using the link_to_remote()
function. Clicking on one of these links goes to the controller and
returns any child categories. I''m finding that the page works ok but
after a number of clicks (average 5 or so), it crashes with an error:
==============================================
Processing Base#index (for
2007 Mar 01
1
ActiveRecord::StatementInvalid error
When I try to run my webserver in the production environment I just
get an application error message. This is all I can find in the log:
ActiveRecord::StatementInvalid
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
connection_adapters/sqlite_adapter.rb:274:in `table_structure''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/