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)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---