我成功安装了 ActiveAdmin:
我的宝石文件代码:
来源“ https://rubygems.org ”
gem 'rails', '3.2.10'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'twitter-bootstrap-rails'
gem 'activeadmin'
# gem "meta_search", '>= 1.1.0.pre'
gem "spud_photos"
gem 'devise'
gem 'cancan'
gem 'rolify'
我这样做了:
bundle
rails g active_admin:install
rake db:migrate
rails g active_admin:resource product
我将一些模型链接到 ActiveAdmin。
单击产品链接上的仪表板后出现错误:
undefined method `per' for #<ActiveRecord::Relation:0x4d15ee0>