Topic: undefined method `cache_template_loading=' for ActionView::Base:Class

Whenever I launch a ruby server (Webrick, Mongrel, Passenger) in production mode for my rails 2.2.0 project, I get 'undefined method `cache_template_loading=' for ActionView::Base:Class'.  The server starts fine if I am in test or development mode. 

The complete trace stack looks something like this:

/vendor/rails/railties/lib/initializer.rb:514:in `send': undefined method `cache_template_loading=' for ActionView::Base:Class (NoMethodError)
    from /vendor/rails/railties/lib/initializer.rb:514:in `initialize_framework_settings'
    from /vendor/rails/railties/lib/initializer.rb:513:in `each'
    from /vendor/rails/railties/lib/initializer.rb:513:in `initialize_framework_settings'
    from /vendor/rails/railties/lib/initializer.rb:510:in `each'
    from /vendor/rails/railties/lib/initializer.rb:510:in `initialize_framework_settings'
    from /vendor/rails/railties/lib/initializer.rb:151:in `process'
    from /vendor/rails/railties/lib/initializer.rb:112:in `send'
    from /vendor/rails/railties/lib/initializer.rb:112:in `run'
        from ./config/environment.rb:13
     ... 27 levels...
    from vendor/rails/railties/lib/commands/server.rb:49
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    from script/server:3

When I point back to v2.1.0 the error disappears and everything works great.

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

You need to remove this line from your environment file:

config.action_view.cache_template_loading

It tends to be in config/environments/production.rb. See this Rails commit.

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

Thanks, this helped me tonight.  I was upgrading from 2.1.1 to 2.2.2 and ran into the same error message in passenger.

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

It's also in config/environments/development.rb

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

thanks for this.  I was having the same error and decided to do a quick search on the error while I waited for my IDE (I'm using netbeans these days) to load up so I could try to debug/fix this.  You're note about the issues was indeed the answer to my problem!  I was able to go immediately to the file and fix it, and even test and verify it in less than 2 minutes from when I started the IDE with the expectation I was going to spend 30 minutes debugging!  again... THANK YOU for taking the time to post here!

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

thanks also for the tip

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

Thanks a lot - great help

Re: undefined method `cache_template_loading=' for ActionView::Base:Class

tanks! Nice topic!