简体   繁体   English

Rails 4我无法安装gem

[英]Rails 4 I can't install gems

Hello I want to install these gem 'activeadmin' , gem "meta_search", '>= 1.1.0.pre' gems to my project but I got error like this 您好,我想将这些gem 'activeadmin'gem "meta_search", '>= 1.1.0.pre'到我的项目中,但是出现了这样的错误

 Bundler could not find compatible versions for gem "actionpack":
  In snapshot (Gemfile.lock):
    actionpack (4.0.2)

  In Gemfile:
    meta_search (>= 1.1.0.pre) ruby depends on
      actionpack (~> 3.1.0.alpha) ruby

How I can solve these problems 我如何解决这些问题

Active Admin has a few other dependencies as well. Active Admin还具有其他一些依赖性。 Check this out Active Admin install with Rails 4 . 通过Rails 4进行Active Admin安装检查。

Copy and paste all the gems (in the top answer) to your gemfile and you should not have any issues running bundle. 将所有gems(在最上面的答案中)复制并粘贴到gemfile中,运行bundle时应该不会有任何问题。

just put "meta_search", '>= 1.1.0.pre' before gem 'activeadmin' 只需在gem'activeadmin'之前放置“ meta_search”,'> = 1.1.0.pre'
this should solve your problem 这应该可以解决您的问题

Meta_search doesn't support rails 4. So you're getting a conflict. Meta_search不支持rails4。因此您遇到了冲突。

Suggest you have a look at Ransack instead, which is basically a ground up rewrite of meta-search. 建议您看看Ransack ,它基本上是对元搜索的完全重写。 If you're using rails 3, then you need to specify this in your Gemfile. 如果您使用的是rails 3,则需要在Gemfile中指定它。

 gem 'devise',              github: 'plataformatec/devise'
gem 'responders',          github: 'plataformatec/responders'
gem 'inherited_resources', github: 'josevalim/inherited_resources'
gem 'ransack',             github: 'ernie/ransack'
gem 'activeadmin',         github: 'gregbell/active_admin'
gem 'formtastic',          github: 'justinfrench/formtastic'

it's worked 它的工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM