# ActionController::SessionRestoreError

**URL:** <https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643>\
**Category:** Rails\
**Created:** [April 10, 2010, 12:33pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643 "2010-04-10T12:33:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 10, 2010, 12:33pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/1 "2010-04-10T12:33:16Z")

</div>

Hiiiiiii

created new application from old application copy of that the old  
application is running but new application is not running fine ,

please help its urgent…

ActionController::SessionRestoreError in Content\_masters#index

Showing app/views/content\_masters/index.html.erb where line #77  
raised:

Session contains objects whose class definition isn’t available.  
Remember to require the classes for all objects kept in the session.  
(Original exception: #{const\_error.message} [#{const\_error.class}])

thanks

rahul

---

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 10, 2010, 12:33pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/2 "2010-04-10T12:33:51Z")

</div>

ActionController::SessionRestoreError in Content\_masters#index

Showing app/views/content\_masters/index.html.erb where line #77  
raised:

Session contains objects whose class definition isn’t available.  
Remember to require the classes for all objects kept in the session.  
(Original exception: #{const\_error.message} [#{const\_error.class}])

Extracted source (around line #77):

74:   
75:

&nbsp;\<%= link\_to  
‘Show’,  
:controller=\>“content\_masters”,:action=\>“show”,:id=\>content\_master.id  
%\>  
76: &nbsp;\<%= link\_to ‘Edit’,  
edit\_content\_master\_path(content\_master) %\>  
77: &nbsp;\<%= link\_to ‘Destroy’, content\_master, :confirm =\>  
‘Are you sure?’, :method =\> :delete %\>  
78:   
79: \<%  
80:  
@dd=ContentMaster.find(:all,:conditions=\>“parent\_id=#{content\_master.id}”)

---

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 10, 2010, 12:42pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/3 "2010-04-10T12:42:03Z")

</div>

On Apr 10, 11:32 am, Rahul M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ActionController::SessionRestoreError in Content\_masters#index
> 
> Showing app/views/content\_masters/index.html.erb where line #77  
> raised:
> 
> Session contains objects whose class definition isn't available.  
> Remember to require the classes for all objects kept in the session.  
> (Original exception: #{const\_error.message} [#{const\_error.class}])

It’s pretty much what it says - Something is stored in the session  
that Rails can’t pull out because it can’t find the corresponding  
class. What have you been putting in the session (and as a general  
rule it’s good practice to keep to fairly simple data in the session  
(arrays, hashes, strings, numbers etc.)

Fred

---

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 10, 2010, 1:03pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/4 "2010-04-10T13:03:08Z")

</div>

i havent used session , is it due to plugins i have used and not  
installed in new app.  
for that what i need to do…

On Apr 10, 3:40 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 10, 2010, 1:42pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/5 "2010-04-10T13:42:21Z")

</div>

it is giving this error where  
\<%=flash[:message]%\>

flash message is given

pls help…

---

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 11, 2010, 7:39am UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/6 "2010-04-11T07:39:30Z")

</div>

Thanks Fred My problem is solved by clearing history of browser.

thanks

rahul

On Sat, Apr 10, 2010 at 5:16 PM, Frederick C. \<

---

<div class="post-metadata">

**Author:** ![rahul\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/43a26b/32.png) [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Post date:** [April 10, 2010, 1:47pm UTC](https://www.ruby-forum.com/t/actioncontroller-sessionrestoreerror/186643/7 "2010-04-10T13:47:37Z")

</div>

On Apr 10, 12:01 pm, Rahul M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i havent used session , is it due to plugins i have used and not  
> installed in new app.  
> for that what i need to do…

Well you need to figure out what those plugins are doing. If you  
restart your browser and the problem goes away then the problem was  
just that when the session was created one of these plugins was  
putting stuff in it (although this does highlight the danger of  
storing that kind of stuff in the session). If not then keep digging -  
you should always understand what the plugins you use are doing!

Fred
