Welcome Guest | Login

Stale sessions?

I keep getting this error:

Processing HomeController#index (for 202.128.36.146 at 2008-06-11 09:32:10) [GET]
 Session ID: c96c953d83b1bef4c2920c60d4fae1cb
 Parameters: {"action"=>"index", "controller"=>"home"}
Rendering template within layouts/scaffold
Rendering home/index
Completed in 0.02383 (41 reqs/sec) | Rendering: 0.02166 (90%) | DB: 0.00000 (0%) | 200 OK http://royalpalmresidences.net/]
/!\ FAILSAFE /!\  Wed Jun 11 09:32:40 -0500 2008
 Status: 500 Internal Server Error
 wrong number of arguments (2 for 1)
   /usr/local/lib/ruby/1.8/cgi/session.rb:267:in `respond_to?'
   /usr/local/lib/ruby/1.8/cgi/session.rb:267:in `initialize_without_cgi_reader'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_ext/session.rb:39:in `initialize'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:130:in `new'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:130:in `session'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:166:in `stale_session_check!'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:114:in `session'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1131:in `assign_shortcuts_without_flash'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/flash.rb:167:in `assign_shortcuts'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:518:in `process_without_filters'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:101:in `process_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:149:in `with_signal_handler'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:99:in `process_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:77:in `process_each_request'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:76:in `process_each_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:50:in `process!'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in `process!'
   dispatch.fcgi:24
It seems that if I do rake tmp:clear and clear my cookies in my browser, I get to load the website... but ONCE.  If I hit refresh I get the same error again.

What should I do?

2008-06-11 09:43 AM

I could recreate the issue you have mentioned. I noticed that you are using rails-2.0.2 version for this application. The default rails version on the server is 2.1.0

Can you try freezing your rails application to 2.0.2. Please follow the link pasted below for freezing your app to a particular rails version.

www.hostingrails.com/forums/wiki_thread/2

2008-06-11 10:36 AM

Regards,
Rahul
okay i downgraded to 2.0.2 and the error changed.
now it tha Rails app failed to start properly.

i looked at the error log in cPanel and i got
[Thu Jun 12 03:28:22 2008] [notice] mod_fcgid: process /home/royalpa/public_html/dispatch.fcgi(3067) exit(communication error), terminated by calling exit(), return code: 1
[Thu Jun 12 03:28:19 2008] [notice] mod_fcgid: server /home/royalpa/public_html/dispatch.fcgi(3067) started
from the advice on this [url http://www.hostingrails.com/forums/deployment_troubleshooting_thread/845 ] page [/url]
i tried running dispatch.fcgi manually

i got this error now
./../config/../vendor/rails/railties/lib/initializer.rb:49:in `send': undefined method `install_gem_spec_stubs' for #<Rails::Initializer:0xb7f26428> (NoMethodError)
       from ./../config/../vendor/rails/railties/lib/initializer.rb:49:in `run'
       from ./../config/boot.rb:46:in `load_initializer'
       from ./../config/boot.rb:38:in `run'
       from ./../config/boot.rb:11:in `boot!'
       from ./../config/boot.rb:109
       from ./../config/environment.rb:4:in `require'
       from ./../config/environment.rb:4
       from dispatch.fcgi:21:in `require'
       from dispatch.fcgi:21

2008-06-12 03:49 AM

Hi there - I removed the rails folders in your vendor/ folder and now your site seems to load fine.  Rails was getting confused because there was a rails/ and a rails-2.0.2 folder in there...

2008-06-12 09:36 AM

wow! thanks for the help guys :)

2008-06-14 06:29 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.