Friday, July 29, 2011

Getting error "undefined method `debug_rjs=' for ActionView::Base:Class (NoMethodError)"

Successfully installed RVM, Ruby 1.9.2 with RVM, Rails 3.2.0.beta
While upgrading to Rails 3.2.0.beta on Mac, getting following error:

/Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/thinking-sphinx-ea7673a0188f/lib/thinking_sphinx/search.rb:623: warning: encoding option is ignored - u
=> Booting WEBrick
=> Rails 3.2.0.beta application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/actionpack/lib/action_view/railtie.rb:34:in `block (3 levels) in <class:Railtie>': undefined method `debug_rjs=' for ActionView::Base:Class (NoMethodError)
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/actionpack/lib/action_view/railtie.rb:33:in `each'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/actionpack/lib/action_view/railtie.rb:33:in `block (2 levels) in <class:Railtie>'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/actionpack/lib/action_view/railtie.rb:32:in `block in <class:Railtie>'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/initializable.rb:25:in `instance_exec'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/initializable.rb:25:in `run'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/initializable.rb:50:in `block in run_initializers'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/initializable.rb:49:in `each'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/initializable.rb:49:in `run_initializers'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/application.rb:92:in `initialize!'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/ror/projects/restaurant/config/environment.rb:6:in `<top (required)>'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/dependencies.rb:236:in `require'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/dependencies.rb:236:in `block in require'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/dependencies.rb:222:in `block in load_dependency'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/dependencies.rb:616:in `new_constants_in'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/dependencies.rb:222:in `load_dependency'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/activesupport/lib/active_support/dependencies.rb:236:in `require'
    from /Users/ror/projects/restaurant/config.ru:4:in `block in <main>'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/builder.rb:51:in `instance_eval'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/builder.rb:51:in `initialize'
    from /Users/ror/projects/restaurant/config.ru:1:in `new'
    from /Users/ror/projects/restaurant/config.ru:1:in `<main>'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/builder.rb:40:in `eval'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/builder.rb:40:in `parse_file'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/server.rb:200:in `app'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/commands/server.rb:46:in `app'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/server.rb:301:in `wrapped_app'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/gems/rack-1.3.2/lib/rack/server.rb:252:in `start'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/commands/server.rb:70:in `start'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/commands.rb:54:in `block in <top (required)>'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/commands.rb:49:in `tap'
    from /Users/ror/projects/restaurant/highline/ruby/1.9.1/bundler/gems/rails-30dae273c85a/railties/lib/rails/commands.rb:49:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Solution to fix the problem:
Comment the line in config/environments/development.rb  (if working on development)
# config.action_view.debug_rjs             = true

4 comments: