On Thu, Jul 9, 2009 at 11:49 AM, shusseina<
s.anderson.au@...> wrote:
> Viewing
http://localhost:3000/stories in my browser should display the
> file app/views/stories/index.html.erb, but instead displays the
> following error:
>
> Status: 500 Internal Server Error Content-Type: text/html
> 500 Internal Server Error
>
> Any ideas what might be causing this error?
...
> Status: 500 Internal Server Error
> A secret is required to generate an integrity hash for cookie
> session data. Use config.action_controller.session = { :session_key =>
> "_myapp_session", :secret => "some secret phrase of at least 30
> characters" } in config/environment.rb
Well, it's telling you how to fix it. You need to put something like
config.action_controller.session = {
:session_key = "-myapp_session", # where myapp should be the
name of your application instead of myap
:secret => "Some Random String at least 30 characters long,
usually a long hexadecimal string"
}
somewhere inside the intializer block (which begins with)
Rails::Initializer.run do |config|
inside config/environment.rb
You can and probably should use rake secret to generate the secret.
--
Rick DeNatale
Blog:
http://talklikeaduck.denhaven2.com/Twitter:
http://twitter.com/RickDeNataleWWR:
http://www.workingwithrails.com/person/9021-rick-denataleLinkedIn:
http://www.linkedin.com/in/rickdenatale--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk@...
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en-~----------~----~----~----~------~----~------~--~---