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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11 Dec 2008, at 15:47, Kad Kerforn wrote:> > 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> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 11 Dec 2008, at 15:47, Kad Kerforn wrote: >> 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 > > FredThanks a lot..... is there any link to a doc where i can read more about the initialization process... ? (like the one I have on boot process of my OS X system...) -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---