[英]Rails: Error installing activeadmin
I have a rails project, and i want to install the activeadmin gem . 我有一个Rails项目,我想安装activeadmin gem 。 So i have added this to the gemfile :
所以我已经将此添加到gemfile :
gem 'activeadmin'
gem "meta_search"
The problem is that when i run the bundle command, i get this error: 问题是,当我运行bundle命令时,出现此错误:
Bundler could not find compatible versions for gem "actionpack": In Gemfile: activeadmin (>= 0) ruby depends on meta_search (>= 0.9.2) ruby depends on actionpack (~> 3.0.0.rc2) ruby
Bundler找不到与gem“ actionpack”兼容的版本:在Gemfile中:activeadmin(> = 0)ruby取决于meta_search(> = 0.9.2)ruby取决于actionpack(〜> 3.0.0.rc2)ruby
less-rails (>= 0) ruby depends on actionpack (4.1.8)
较少轨(> = 0)红宝石取决于actionpack(4.1.8)
Do you know how can i fix this? 你知道我该如何解决吗?
If you are using rails 5.1 or above 如果您使用的是Rails 5.1或更高版本
gem 'inherited_resources', git: 'https://github.com/activeadmin/inherited_resources'
gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin'
If you are using rails 4 如果您使用滑轨4
gem 'activeadmin', github: 'activeadmin/activeadmin', branch: :master
If you are using rails 4 with gem 'mongoid','~> 5.0.0' then add 如果您将Rails 4与宝石'mongoid'一起使用,则~~ 5.0.0',然后添加
gem 'activeadmin', github: 'Zhomart/active_admin', branch: 'mongoid-old'
Try this. 尝试这个。 Hope it will work :)
希望它能工作:)
代替您的Gemfile中的两个宝石,将它们替换为:
gem 'activeadmin', github: 'activeadmin'
If you are using rails 5 You have to install inherited_resources gem with active_admin 如果您使用的是Rails 5,则必须使用active_admin安装Inherited_resources gem
gem 'activeadmin', github: 'activeadmin'
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
Try this.Hope it's helpfull 试试这个。希望对您有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.