Problema al arrancar el servidor

Hola!
Intento utilizar la base de datos para almacenar las sesiones de
usuario. He editado el fichero config/environment.rb y cambiar el valor
de la variable config.action_controller.session_store a
:active_record_store. Posteriormente ejecute rake db:sessions:create.
El caso es que al arrancar el servidor me sale esto:

C:/instantrails/InstantRails-1.7-win/InstantRails/rails_apps/project/config/envi
ronment.rb:31: undefined method action_controller' for Config:Module (NoMethodE rror) from C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gem s/1.8/gems/rails-1.2.3/lib/initializer.rb:41:inrun’
from
C:/instantrails/InstantRails-1.7-win/InstantRails/rails_apps/projec
t/config/environment.rb:13
from
C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/sit
e_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require' from C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/sit e_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from
C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gem
s/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
requir e' from C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gem s/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:innew_co
nstants_in’
from
C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gem
s/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
requir e' from C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gem s/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:155:inrails’
… 20 levels…
from
C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/gem
s/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
from
C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/sit
e_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require' from C:/instantrails/InstantRails-1.7-win/InstantRails/ruby/lib/ruby/sit e_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from script/server:3

alguna orientacion? algo que deba mirar? en cualquier caso, gracias

Hola Javi,

¿Puedes pegar tu environment.rb en pastie para echarle un vistazo?

Saludos,
Raul M.

Raul M. wrote:

Hola Javi,

?Puedes pegar tu environment.rb en pastie para echarle un vistazo?

Saludos,
Raul M.

Be sure to restart your web 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 = ‘1.2.3’ 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

Skip frameworks you’re not going to use (only works if using

vendor/rails)

config.frameworks -= [ :action_web_service, :action_mailer ]

Only load the plugins named here, by default all plugins in

vendor/plugins are loaded

config.plugins = %W( exception_notification ssl_requirement )

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

Use the database for sessions instead of the file system

(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

Make Active Record use UTC-base instead of local time

config.active_record.default_timezone = :utc

See Rails::Configuration for more options

end

Add new inflection rules using the following format

(all these examples are active by default):

Inflector.inflections do |inflect|

inflect.plural /^(ox)$/i, ‘\1en’

inflect.singular /^(ox)en/i, ‘\1’

inflect.irregular ‘person’, ‘people’

inflect.uncountable %w( fish sheep )

end

Add new mime types for use in respond_to blocks:

Mime::Type.register “text/richtext”, :rtf

Mime::Type.register “application/x-mobile”, :mobile

Include your application configuration below

Raul M. wrote:

Prueba con

config.action_controller.session_store = :active_record_store

en vez de

Config.action_controller.session_store = :active_record_store
^
a ver si con suerte ese es todo el problema :slight_smile:

Saludos,
Raul M.

He probado y nada. Puede tener algo que ver con el MySql server que use?

Saludos,

Javi

Javi J.
escribió: > He probado y nada. Puede tener algo que ver con el MySql server que
use?

¿Te sigue dando el mismo mensaje de error?

Saludos,
Raul M.

Raul M. wrote:

Prueba con

config.action_controller.session_store = :active_record_store

en vez de

Config.action_controller.session_store = :active_record_store
^
a ver si con suerte ese es todo el problema :slight_smile:

Saludos,
Raul M.

Rectifico!

Tenias razon era esa tonteria. lo que paso es que antes me equivoque y
lo cambie en el config de otro proyecto :S soy un despistao sin
remedio. Todo solucionado muchas gracias!!!

Prueba con

config.action_controller.session_store = :active_record_store

en vez de

Config.action_controller.session_store = :active_record_store
^
a ver si con suerte ese es todo el problema :slight_smile:

Saludos,
Raul M.