uninitialized constant ActionVie

Hello

I am trying to transform my web app into a 2.2 ready app, in my config/environment.rb I wrote

Rails::Initializer.run do |config| .....   # disabling the surrounding div if validation error   ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|     if html_tag.include?("class=")       html_tag.sub(%r{(class=["'])}, '\1invalid ')     else       html_tag.sub(%r{(<[^ ]+ )}, '\1class="invalid" ')     end   end .. end

BUT running the console I get an error :

yves$ script/console

Loading development environment (Rails 2.2.2)

/...i/config/environment.rb:111:NameError: uninitialized constant ActionView /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:14:in `included':NameError: uninitialized constant ActiveSupport::Callbacks

/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/console_with_helpers.rb:19:NoMethodError: undefined method `require_dependency' for main:Object

what could be the error ? thanks for your help ...

erwin

(Rails 2.2.2 , Ruby 1.8.7, on Mac OS X10.5)

BUT running the console I get an error :

yves$ script/console

Loading development environment (Rails 2.2.2)

/...i/config/environment.rb:111:NameError: uninitialized constant ActionView /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/testing/setup_and_teardown.rb:14:in `included':NameError: uninitialized constant ActiveSupport::Callbacks

/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/ console_with_helpers.rb:19:NoMethodError: undefined method `require_dependency' for main:Object

what could be the error ? thanks for your help ...

ActionView hasn't been loaded yet. Move all of that into a file in
config/initializers

Fred