Friday, April 3, 2009

uninitialized constant CGI::Session (NameError)

After upgrading one project to Rails 2.3.2 I got an error on startup uninitialized constant CGI::Session (NameError)
Looking into the source I found that I was loading this class CGI::Session::ActiveRecordStore::Session

After a little hunting on Google I was directed to the Rails release notes and found this section:


script/server has been switched to use Rack, which means it supports any Rack compatible server. script/server will also pick up a rackup configuration file if one exists. By default, it will look for a config.ru file, but you can override this with the -c switch.

CGI::Session::ActiveRecordStore has been replaced by ActiveRecord::SessionStore.

Done!

No comments: