Hi, lately I find that my rails server on winxp desktop seems erratic. Sometimes when I access my sample applications from the tutorials (especially those that use login redirection), rails will return a Not found error, e.g. ''/weblog'' not found.. Only after restarting the server and reopening new browser instance, I can access rails again. also I noticed that, whenever I access a page and close my browser, the following errors will appear: [2005-02-17 23:26:31] ERROR Errno::EINVAL: Invalid argument g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'' g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'' g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'' g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'' g:/tools/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'' anyone faced this problem on winxp? could it be sesison problem? below are the gems i have: actionmailer (0.6.1) actionpack (1.4.0) activerecord (1.6.0) fxruby (1.2.2) rails (0.9.5, 0.9.4.1) rake (0.4.15) RedCloth (3.0.1) sources (0.0.1) Thx..
some further error message that I saw: http://127.0.0.1:3000/login/ -> /login/authenticate #<ActionController::SessionRestoreError: Session contained objects where the class definition wasn''t available. Remember to require classes for all objects kept in the session. The session has been deleted.> Could this be the reason? On Thu, 17 Feb 2005 23:29:41 +0800, boonhoo <theebh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, lately I find that my rails server on winxp desktop seems erratic. > Sometimes when I access my sample applications from the tutorials > (especially those that use login redirection), rails will return a > Not found error, e.g. ''/weblog'' not found.. Only after restarting the > server and reopening new browser instance, I can access rails again. > > also I noticed that, whenever I access a page and close my browser, > the following errors will appear: > [2005-02-17 23:26:31] ERROR Errno::EINVAL: Invalid argument > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'' > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'' > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'' > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'' > g:/tools/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'' > > anyone faced this problem on winxp? could it be sesison problem? > > below are the gems i have: > actionmailer (0.6.1) > actionpack (1.4.0) > activerecord (1.6.0) > fxruby (1.2.2) > rails (0.9.5, 0.9.4.1) > rake (0.4.15) > RedCloth (3.0.1) > sources (0.0.1) > > Thx.. >
Ok I think I solved the problem. In my login_controller, I change the line from: if @session["person"] = Person.authenticate(@params["name"], @params["password"]) ...to : if @person = Person.authenticate(@params["name"], @params["password"]) @session["person"] = @person.id This seems to make a difference. The login redirection works perfectly now. Rgds, boonhoo On Thu, 17 Feb 2005 23:36:23 +0800, boonhoo <theebh@gmail.com> wrote:> some further error message that I saw: > > http://127.0.0.1:3000/login/ -> /login/authenticate > #<ActionController::SessionRestoreError: Session contained objects > where the class definition wasn''t available. Remember to require > classes for all objects kept in the session. The session has been > deleted.> > > Could this be the reason? > > > On Thu, 17 Feb 2005 23:29:41 +0800, boonhoo <theebh@gmail.com> wrote: > > Hi, lately I find that my rails server on winxp desktop seems erratic. > > Sometimes when I access my sample applications from the tutorials > > (especially those that use login redirection), rails will return a > > Not found error, e.g. ''/weblog'' not found.. Only after restarting the > > server and reopening new browser instance, I can access rails again. > > > > also I noticed that, whenever I access a page and close my browser, > > the following errors will appear: > > [2005-02-17 23:26:31] ERROR Errno::EINVAL: Invalid argument > > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'' > > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'' > > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'' > > g:/tools/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'' > > g:/tools/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'' > > > > anyone faced this problem on winxp? could it be sesison problem? > > > > below are the gems i have: > > actionmailer (0.6.1) > > actionpack (1.4.0) > > activerecord (1.6.0) > > fxruby (1.2.2) > > rails (0.9.5, 0.9.4.1) > > rake (0.4.15) > > RedCloth (3.0.1) > > sources (0.0.1) > > > > Thx.. > > >