这个项目是用rails 3.0.9构建的.

Now i updated the gems and Gemfile =>

source 'http://rubygems.org'

gem 'rails', '3.1.1'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'pg'
gem 'devise'
gem "will_paginate"
gem 'ruby-debug19'
gem 'rack', '1.3.3'
gem 'jquery-rails'

After rails s, when i do , http://0.0.0.0:3000/ i get this error =>

=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-10-10 17:50:23] INFO  WEBrick 1.3.1
[2011-10-10 17:50:23] INFO  ruby 1.9.2 (2011-02-18) [i686-linux]
[2011-10-10 17:50:23] INFO  WEBrick::HTTPServer#start: pid=3103 port=3000
[2011-10-10 17:50:31] ERROR NoMethodError: undefined method `debug_rjs=' for ActionView::Base:Class
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_view/railtie.rb:34:in `block (3 levels) in <class:Railtie>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_view/railtie.rb:33:in `each'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_view/railtie.rb:33:in `block (2 levels) in <class:Railtie>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_view/base.rb:216:in `<class:Base>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_view/base.rb:133:in `<module:ActionView>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_view/base.rb:8:in `<top (required)>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/abstract_controller/view_paths.rb:90:in `view_paths='
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/abstract_controller/view_paths.rb:76:in `prepend_view_path'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.1/lib/rails/engine.rb:532:in `block (2 levels) in <class:Engine>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_controller/base.rb:234:in `<class:Base>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_controller/base.rb:171:in `<module:ActionController>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_controller/base.rb:3:in `<top (required)>'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:31:in `ext'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:15:in `match?'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:47:in `call'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.1/lib/rails/engine.rb:456:in `call'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.1/lib/rails/rack/content_length.rb:16:in `call'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.1/lib/rails/rack/log_tailer.rb:14:in `call'
    /home/user1/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.3/lib/rack/handler/webrick.rb:59:in `service'
    /home/user1/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
    /home/user1/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
    /home/user1/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

怎么办?

推荐答案

RJS已经从Rails 3.1中抽象出来,JQuery是新的默认版本.

http://weblog.rubyonrails.org/2011/4/21/jquery-new-default

如果你想使用RJS,你需要包括

gem 'prototype-rails'

在你的档案里

Ruby-on-rails相关问答推荐

在Ruby on Rails中获取堆栈级别太深错误(&Q)

如何将POST-CSSS-IMPORT与TRANWIND-RACKS和IMPORT映射一起使用

DateTime的最小数据提交格式

包含字母和数字组合的正则表达式

创建大哈希的 Ruby 方法

API Rails 路由,令牌是路由的一部分

Rails HMAC - 使用应用程序机密作为加密密钥

Rails 7:加载所有刺激控制器

Ruby Sinatra Web 服务在 localhost:4567 上运行,但不在 IP 上

如何添加到序列化数组

如何将自定义过滤器添加到 Active Admin?

如何避免 RSpec 3.0 中 stub_chain 的弃用警告?

在 Rails 4 中检测用户代理 - 读取 HTTP 标头

如何在 rspec 中运行单个测试?

是否有与 PHP 的 isset() 等效的 Rails?

如何让空白复选框作为假传递给参数

Rails:如何在表单的必填字段上禁用星号?

我如何在具有活动记录的 Rails 中使用两个不同的数据库?

设置EDITOR或BUNDLER_EDITOR环境变量

为什么 Mac OS X 带有 ruby​​/rails?