ERROR NoMethodError: undefined method `debug_rjs=' for ActionView::Base:Class

放肆的年华 提交于 2019-12-03 10:23:36

RJS has been abstracted out of Rails 3.1 and JQuery is the new default.

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

If you would like to use RJS, you need to include

gem 'prototype-rails'

in your Gemfile

If you'd like to use jQuery instead of RJS for an existing application, delete or comment the following line from config/environments/development.rb

# config.action_view.debug_rjs = true

You may want to add them to your app/assets/javascripts/application.js:

//= require prototype
//= require prototype_ujs
//= require effects
//= require dragdrop
//= require controls

https://github.com/rails/prototype-rails/blob/master/README#L15-19

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!