我运行rails g active-admin:install
使用Gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0'
gem 'pg'
gem 'activeadmin', github: 'activeadmin/activeadmin'
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
gem 'devise', '> 4.x'
gem 'rspec-rails', '>= 3.5.0.beta1'
gem 'ransack', github: 'activerecord-hackery/ransack'
gem 'kaminari', github: 'amatsuda/kaminari', branch: '0-17-stable'
gem 'formtastic', github: 'justinfrench/formtastic'
gem 'draper', github: 'audionerd/draper', branch: 'rails5', ref: 'e816e0e587'
gem 'activemodel-serializers-xml', github: 'rails/activemodel-serializers-xml'
gem 'rack-mini-profiler', github: 'MiniProfiler/rack-mini-profiler'
gem 'database_cleaner', github: 'pschambacher/database_cleaner', branch: 'rails5.0', ref: '430a957'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
但是得到错误:
/home/user/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/action_dispatch/middleware/stack.rb:74:in `insert': can't modify frozen Array (RuntimeError)
from /home/user/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/action_dispatch/middleware/stack.rb:74:in `insert'
当我跑步时:
bundle install
效果很好。
任何人都可以帮助我吗?
更新
通过安装或更新ruby版本解决。
答案 0 :(得分:2)
请将Gemfile更新为:
gem 'devise'
gem 'activeadmin', github: 'activeadmin'
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
并运行
rails g active_admin:install