# script/server error

**URL:** <https://discuss.rubyonrails.org/t/script-server-error/31566>\
**Category:** rubyonrails-talk\
**Created:** [July 8, 2008, 2:33pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566 "2008-07-08T14:33:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Camel](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Camel](https://discuss.rubyonrails.org/u/Camel)\
**Post date:** [July 8, 2008, 2:33pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/1 "2008-07-08T14:33:18Z")

</div>

Not sure why I'm getting this error, cause I believe it worked yesterday before I quit and now it's giving me this error. The last thing I did was try and get an ActionMailer thing to work. I searched through the archives but nothing seemed applicable to my error. Here's the error I'm getting:

ruby script/server =\> Booting Mongrel (use 'script/server webrick' to force WEBrick) =\> Rails 2.1.0 application starting on [http://0.0.0.0:3000](http://0.0.0.0:3000) =\> Call with -d to detach =\> Ctrl-C to shutdown server \*\* Starting Mongrel listening at 0.0.0.0:3000 \*\* Starting Rails with development environment... Exiting C:/Ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active\_support/depen dencies.rb:492:in `const_missing': uninitialized constant CGI::Session::ActiveRe cordStore (NameError) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action_con troller/session_management.rb:26:in `const\_get' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ action\_con troller/session\_management.rb:26:in `session_store=' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 455:in `send' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 455:in `initialize_framework_settings' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 454:in `each' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 454:in `initialize_framework_settings' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 451:in `each' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 451:in `initialize_framework_settings' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 30 levels... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ commands/server .rb:39 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:i n `gem\_original\_require' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/Ruby/ruby/lib/ruby/site\_ruby/1.8/rubygems/ custom\_require.rb:27:i n `require' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from script/server:3

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [July 8, 2008, 2:37pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/2 "2008-07-08T14:37:16Z")

</div>

Looks like something to do with the session settings in environment.rb

Fred

---

<div class="post-metadata">

**Author:** ![Camel](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Camel](https://discuss.rubyonrails.org/u/Camel)\
**Post date:** [July 8, 2008, 2:44pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/3 "2008-07-08T14:44:04Z")

</div>

Here's my environment.rb file:

# Be sure to restart your server when you modify this file

# Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS\_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present RAILS\_GEM\_VERSION = '2.1.0' unless defined? RAILS\_GEM\_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(\_\_FILE\_\_), 'boot')

Rails::Initializer.run do |config| &nbsp;&nbsp;# Settings in config/environments/\* take precedence over those specified here. &nbsp;&nbsp;# Application configuration should go into files in config/ initializers &nbsp;&nbsp;# -- all .rb files in that directory are automatically loaded. &nbsp;&nbsp;# See Rails::Configuration for more options.

&nbsp;&nbsp;# Skip frameworks you're not going to use. To use Rails without a database &nbsp;&nbsp;# you must remove the Active Record framework. &nbsp;&nbsp;config.frameworks -= [:active\_record, :active\_resource, :action\_mailer]

&nbsp;&nbsp;# Specify gems that this application depends on. &nbsp;&nbsp;# They can then be installed with "rake gems:install" on new installations. &nbsp;&nbsp;# config.gem "bj" &nbsp;&nbsp;# config.gem "hpricot", :version =\> '0.6', :source =\> "http:// code.whytheluckystiff.net" &nbsp;&nbsp;# config.gem "aws-s3", :lib =\> "aws/s3"

&nbsp;&nbsp;# Only load the plugins named here, in the order given. By default, all plugins &nbsp;&nbsp;# in vendor/plugins are loaded in alphabetical order. &nbsp;&nbsp;# :all can be used as a placeholder for all plugins not explicitly named &nbsp;&nbsp;# config.plugins = [:exception\_notification, :ssl\_requirement, :all]

&nbsp;&nbsp;# Add additional load paths for your own custom dirs &nbsp;&nbsp;# config.load\_paths += %W( #{RAILS\_ROOT}/extras )

&nbsp;&nbsp;# Force all environments to use the same logger level &nbsp;&nbsp;# (by default production uses :info, the others :debug) &nbsp;&nbsp;# config.log\_level = :debug

&nbsp;&nbsp;# Make Time.zone default to the specified zone, and make Active Record store time values &nbsp;&nbsp;# in the database in UTC, and return them converted to the specified local zone. &nbsp;&nbsp;# Run "rake -D time" for a list of tasks for finding time zone names. Uncomment to use default local time. &nbsp;&nbsp;config.time\_zone = 'UTC'

&nbsp;&nbsp;# Your secret key for verifying cookie session data integrity. &nbsp;&nbsp;# If you change this key, all old sessions will become invalid! &nbsp;&nbsp;# Make sure the secret is at least 30 characters and all random, &nbsp;&nbsp;# no regular words or you'll be exposed to dictionary attacks. &nbsp;&nbsp;config.action\_controller.session = { &nbsp;&nbsp;&nbsp;&nbsp;:session\_key =\> '\_theatre\_session', &nbsp;&nbsp;&nbsp;&nbsp;:secret =\> 'ae40239837165baa87c29a1c0a14ec1e59e09fc7e99186f3b27b2bb1c8c94d02829388dcc4d7ad263e589a8359c28fcb8fa94901de4da81949b77a2847fadbc7' &nbsp;&nbsp;}

&nbsp;&nbsp;# Use the database for sessions instead of the cookie-based default, &nbsp;&nbsp;# which shouldn't be used to store highly confidential information &nbsp;&nbsp;# (create the session table with "rake db:sessions:create") &nbsp;&nbsp;config.action\_controller.session\_store = :active\_record\_store

&nbsp;&nbsp;# Use SQL instead of Active Record's schema dumper when creating the test database. &nbsp;&nbsp;# This is necessary if your schema can't be completely dumped by the schema dumper, &nbsp;&nbsp;# like if you have constraints or database-specific column types &nbsp;&nbsp;# config.active\_record.schema\_format = :sql

&nbsp;&nbsp;# Activate observers that should always be running &nbsp;&nbsp;# config.active\_record.observers = :cacher, :garbage\_collector

end

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [July 8, 2008, 3:09pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/4 "2008-07-08T15:09:26Z")

</div>

You can't used the active\_record\_store if you're not loading ActiveRecord.

Fred

---

<div class="post-metadata">

**Author:** ![Camel](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Camel](https://discuss.rubyonrails.org/u/Camel)\
**Post date:** [July 8, 2008, 4:09pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/5 "2008-07-08T16:09:52Z")

</div>

# Skip frameworks you're not going to use. To use Rails without a database # you must remove the Active Record framework.

config.frameworks -= [:active\_record, :active\_resource, :action\_mailer]

&nbsp;&nbsp;# Use the database for sessions instead of the cookie-based default, &nbsp;&nbsp;# which shouldn't be used to store highly confidential information &nbsp;&nbsp;# (create the session table with "rake db:sessions:create")

&nbsp;&nbsp;config.action\_controller.session\_store = :active\_record\_store

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [July 8, 2008, 4:16pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/6 "2008-07-08T16:16:00Z")

</div>

> # Skip frameworks you're not going to use. To use Rails without a database # you must remove the Active Record framework.
> 
> config.frameworks -= [:active\_record, :active\_resource, :action\_mailer]
> 
> # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rake db:sessions:create")
> 
> config.action\_controller.session\_store = :active\_record\_store
> 
> I've got :active\_record loaded... or am I missing something?

No you haven't: you're removing active\_record, active\_resource,  
action\_mailer from the list of frameworks to load

Fred

---

<div class="post-metadata">

**Author:** ![Camel](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Camel](https://discuss.rubyonrails.org/u/Camel)\
**Post date:** [July 8, 2008, 4:17pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/7 "2008-07-08T16:17:07Z")

</div>

Oh. Well, now that makes a lot more sense. I'll try that and get back to you.

---

<div class="post-metadata">

**Author:** ![Camel](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Camel](https://discuss.rubyonrails.org/u/Camel)\
**Post date:** [July 8, 2008, 5:03pm UTC](https://discuss.rubyonrails.org/t/script-server-error/31566/8 "2008-07-08T17:03:27Z")

</div>

That seemed to work. I'm not sure why it did, cause I never messed with the config.framework thing before.. not that i recall anyway.

Thanks Fred.

-Camel
