Need some help for the issues that caused because of secret key in rails application

Posted by sam on Stack Overflow See other posts from Stack Overflow or by sam
Published on 2010-03-18T06:21:28Z Indexed on 2010/03/18 8:31 UTC
Read the original article Hit count: 590

Filed under:

I have a weird problem. I have a rails application. When I am trying to run the ruby script/about command, it is displaying the details when the secret key in config/initializers/session_store.rb was removed or commented. When I place the secret key in the file and if i runs the ruby script/about command it is throwing error as

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependenc
es.rb:443:in `load_missing_constant': uninitialized constant ActionController (
ameError)
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_supp
rt/dependencies.rb:80:in `const_missing'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_supp
rt/dependencies.rb:92:in `const_missing'
        from D:/chat/config/initializers/session_store.rb:13
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `g
m_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `r
quire'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_supp
rt/dependencies.rb:156:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_supp
rt/dependencies.rb:521:in `new_constants_in'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_supp
rt/dependencies.rb:156:in `require'
         ... 7 levels...
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/about.rb:1
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `g
m_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `r
quire'
        from script/about:3

In config/initializers/session_store.rb file the error is shown for the below code.

ActionController::Base.session = {
  :key         => '_chat_session',
  :secret      => '0fb230c7ae72f9a0cb2417b0ad75db3b48cabf327eeedb0557ae07ecf894f34f55e2dfb9ce6c49f05959ceac9812a7193de04690a931fcf757973195a84cd2d2'
}

Could anyone please help me.

Thanks in-advance, sam

© Stack Overflow or respective owner

Related posts about ruby-on-rails