Forum: Ruby on Rails Upgrade old rails app issues.. help

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
<-_-_-|Rek2|-_-_--> (Guest)
on 2009-05-06 23:17
(Received via mailing list)
Hi I never had to upgrade someone elses rail application so this is
getting a bit fustrating but mostly because I have no experience..
I downloaded  http://sourceforge.net/projects/grabthemic  that has not
been updated for 2 years but I am going to build a Digg alike site so
decided to not reinvent the wheel and pick up a current project..
but I get this error:

grabthemic-v0.7 $ ./script/server
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:163:in
`ensure_session_key': A key is required to write a cookie containing the
session data. Use config.action_controller.session = { :key =>
"_myapp_session", :secret => "some secret phrase" } in
config/environment.rb (ArgumentError)
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:74:in
`initialize'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in
`new'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in
`build'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in
`build'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/inflector.rb:361:in
`inject'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in
`each'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in
`inject'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in
`build'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:82:in
`initialize'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:52:in
`new'
        from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:52:in
`run_prepare_callbacks'
        from
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:609:in
`prepare_dispatcher'
        from
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:183:in
`process'
        from
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
        from
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
        from /home/rek2/Desktop/grabthemic-v0.7/config/environment.rb:10
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
        from
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from ./script/server:3
Tom Z Meinlschmidt (Guest)
on 2009-05-07 03:45
(Received via mailing list)
Use config.action_controller.session = { :key =>
"_myapp_session", :secret => "some secret phrase" } in
config/environment.rb

so open config/environment.rb and make changes as required.

tom

<-_-_-|Rek2|-_-_--> wrote:
> 
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:163:in
>         from
> `each'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:52:in
> /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
> `require'
> `gem_original_require'
>         from
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
>         from ./script/server:3
>
>
>
>

--
===============================================================================
Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

www.meinlschmidt.com  www.maxwellrender.cz  www.lightgems.cz
===============================================================================
<-_-_-|Rek2|-_-_--> (Guest)
on 2009-05-07 22:22
(Received via mailing list)
Hi, any help with this?
Frederick C. (Guest)
on 2009-05-07 22:52
(Received via mailing list)
On 7 May 2009, at 11:18, "<-_-_-|Rek2|-_-_-->"
<removed_email_address@domain.invalid> wrote:

>
> Hi, any help with this?
>
Have you tried doing what the error message suggests?

Fred
Greg W. (Guest)
on 2009-07-27 21:26
I'm having this same problem...

Dead simple application created in 1.2.6. No database, no sessions,
pretty much a site which could have just been static HTML, but was
planned to extend beyond that (and now is).

What's confusing to me about the suggestion made by the error message
(to add config.action_controller.session into environment.rb) is that it
looks identical in purpose to the code in
/initializers/session_store.rb.

Either way, adding the code to environment.rb, and making sure the key
was the same in session_store.rb, did not fix the problem. mongrel log
still reports the same error, and the app still won't start up.

BTW -- I have upgraded another 1.2.6 app, but that one used db session
store, and it worked immediately after my update process.

-- gw
This topic is locked and can not be replied to.