我的rails应用程序生成以下错误(运行rails生成器或启动WEBrick时):
/home/lachlan/.gem/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/dynamic_matchers.rb:50:in `method_missing': undefined method `paginates_per' for #<Class:0x0000000293d7d8> (NoMethodError)
from /home/lachlan/.gem/ruby/1.9.1/gems/rich-1.3.1/app/models/rich/rich_file.rb:13:in `<class:RichFile>'
from /home/lachlan/.gem/ruby/1.9.1/gems/rich-1.3.1/app/models/rich/rich_file.rb:6:in `<module:Rich>'
from /home/lachlan/.gem/ruby/1.9.1/gems/rich-1.3.1/app/models/rich/rich_file.rb:5:in `<top (required)>'
我使用以下宝石,我认为可能涉及错误:
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
gem 'jquery-rails'
gem 'rails_admin'
gem 'rich'
gem 'kaminari'
我已经开始rake db:migrate
。
关于可能导致这种情况的任何想法?
答案 0 :(得分:0)
我设法找出导致问题的原因。我在rails_admin配置中排除了'Rich :: RichFile'。删除此行解决了这个问题。