# Script/server error

**URL:** <https://www.ruby-forum.com/t/script-server-error/142500>\
**Category:** Rails\
**Created:** [July 8, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/script-server-error/142500 "2008-07-08T16:33:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/1 "2008-07-08T16:33:34Z")

</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) 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’  
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=' from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 455:in `send’  
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/  
initializer.rb:  
455:in `initialize_framework_settings' from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 454:in `each’  
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/  
initializer.rb:  
454:in `initialize_framework_settings' from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb: 451:in `each’  
from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/  
initializer.rb:  
451:in `initialize_framework_settings' ... 30 levels... from C:/Ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ commands/server .rb:39 from C:/Ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:i n `gem\_original\_require’  
from C:/Ruby/ruby/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:i  
n `require’  
from script/server:3

* * *

I haven’t touched anything in those directories, so I’m not entirely  
sure why it’s doing that.

Help?

---

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/2 "2008-07-08T16:37:42Z")

</div>

On Jul 8, 3:33 pm, Camel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I haven’t touched anything in those directories, so I’m not entirely  
> sure why it’s doing that.
> 
> Help?

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

Fred

---

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/3 "2008-07-08T16:57:23Z")

</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|

# Settings in config/environments/\* take precedence over those

specified here.

# Application configuration should go into files in config/

initializers

# – all .rb files in that directory are automatically loaded.

# See Rails::Configuration for more options.

# 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]

# Specify gems that this application depends on.

# They can then be installed with “rake gems:install” on new

installations.

# config.gem “bj”

# config.gem “hpricot”, :version =\> ‘0.6’, :source =\> "http://

[code.whytheluckystiff.net](http://code.whytheluckystiff.net)"

# config.gem “aws-s3”, :lib =\> “aws/s3”

# Only load the plugins named here, in the order given. By default,

all plugins

# in vendor/plugins are loaded in alphabetical order.

# :all can be used as a placeholder for all plugins not explicitly

named

# config.plugins =

[:exception\_notification, :ssl\_requirement, :all]

# Add additional load paths for your own custom dirs

# config.load\_paths += %W( #{RAILS\_ROOT}/extras )

# Force all environments to use the same logger level

# (by default production uses :info, the others :debug)

# config.log\_level = :debug

# Make Time.zone default to the specified zone, and make Active

Record store time values

# in the database in UTC, and return them converted to the specified

local zone.

# Run “rake -D time” for a list of tasks for finding time zone

names. Uncomment to use default local time.  
config.time\_zone = ‘UTC’

# Your secret key for verifying cookie session data integrity.

# If you change this key, all old sessions will become invalid!

# Make sure the secret is at least 30 characters and all random,

# no regular words or you’ll be exposed to dictionary attacks.

config.action\_controller.session = {  
:session\_key =\> ‘\_theatre\_session’,  
:secret =\>  
‘ae40239837165baa87c29a1c0a14ec1e59e09fc7e99186f3b27b2bb1c8c94d02829388dcc4d7ad263e589a8359c28fcb8fa94901de4da81949b77a2847fadbc7’  
}

# 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

# Use SQL instead of Active Record’s schema dumper when creating the

test database.

# This is necessary if your schema can’t be completely dumped by the

schema dumper,

# like if you have constraints or database-specific column types

# config.active\_record.schema\_format = :sql

# Activate observers that should always be running

# config.active\_record.observers = :cacher, :garbage\_collector

end

---

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/4 "2008-07-08T18:10:25Z")

</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?

---

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/5 "2008-07-08T17:10:25Z")

</div>

On 8 Jul 2008, at 15:44, Camel wrote:

> config.action\_controller.session\_store = :active\_record\_store  
> You can’t used the active\_record\_store if you’re not loading  
> ActiveRecord.

Fred

---

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/6 "2008-07-08T18:18:04Z")

</div>

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

On Jul 8, 12:16 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Camel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/7 "2008-07-08T18:16:53Z")

</div>

On 8 Jul 2008, at 17:09, Camel wrote:

> # 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://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@Camel](https://www.ruby-forum.com/u/Camel)\
**Post date:** [July 8, 2008, 7:04pm UTC](https://www.ruby-forum.com/t/script-server-error/142500/8 "2008-07-08T19:04:06Z")

</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

On Jul 8, 12:16 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
