small medium large xlarge

09 Sep 2009, 20:29
ron campbell (22 posts)

I accidentally put this in the folder for the other editions of AWDWR, but I see that it belongs here, I am still stuck.

On Page 107 in the PDF, Third Edition. I’m having an issue with the Depot application Cart Sessions.

Despite trying to set my version to run in 2.2.2 along with the book, I am running in 2.3.4, which would be fine, if the update notes were a little more specific

I found the right lines in the config/initializers/session_store.rb, but am not sure which to uncomment. so far, I have tried

  1. (create the session table with “rake db:sessions:create”) ActionController::Base.session_store = :active_record_store config.action_controller.session = { :session_key => ‘_depot_session’ , :secret => ‘f914e9b1bbdb829688de8512f…9b1810a4e238a61dfd922dc9dd62521’ }

and also tried comment out the secret line.

because on the next page it tells that the secret function is no longer needed or supported, but it shuts the server down on initilization.

15 Sep 2009, 02:04
Andrew Rodriguez (3 posts)

Here is my line 46 & 45 from the environment.rb:

# (create the session table with ‘rake db:sessions:create’) config.action_controller.session_store = :active_record_store

My line sfrom 39 to 42 look like:

config.action_controller.session = { :session_key => ‘_depot_session’, :secret => ‘removed key to make more presentable’ }

Did you also uncomment the protect_from_forgery?

I am using the book and just completed the chapter.

15 Sep 2009, 02:05
Andrew Rodriguez (3 posts)

Ah, the reply did some formatting.

And I made a typo, line 46 is commented. Line 47 starts with config.action…

You must be logged in to comment