Buggy Rails method call?

G

gregarican

I know this probably belongs on the Rail ML but I thought I would throw
this out there as a brief aside.

Using Rails 0.12.0 in production I have several controller methods that
set the current page using some code like:

@session[:thisuri] = @request.request_uri

When I refer to this session variable in other methods I would
sporadically receive FastCGI errors in the Rails log like:

Dispatcher failed to catch: 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. (Original
exception: marshal data too short [ArgumentError])
(ActionController::SessionRestoreError)

Not sure if it's FastCGI or the Rails @request... method bugging out on
me. The issues weren't duplicated 100% of the time going through
similar steps using the client web browser. The issues were all
sporadic. To remedy the situation I would hardcode the session variable
assignments, using some code like:

@session[:thisuri] = "/rails/thisMethod"

Then things worked fine every attempt. Strange...
 
G

gregarican

gregarican said:
When I refer to this session variable in other methods I would
sporadically receive FastCGI errors in the Rails log like:

Dispatcher failed to catch: 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. (Original
exception: marshal data too short [ArgumentError])
(ActionController::SessionRest­oreError)

Checking some more on this, I ran across a reference to this (perhaps
similar) situation -->
http://wiki.rubyonrails.com/rails/show/MarshalDataTooShort.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top