2016-02-28 84 views
1

我是使用rails的新手,並使用4.2.4版構建我的第一個Web應用程序。ActiveAdmin with Rails 4:Bundler無法找到適用於gem「rails」的兼容版本

我試圖安裝使用

gem 'activeadmin', '~> 0.6.6' 

然而activeadmin寶石,當我運行捆綁安裝,我得到它說的錯誤:

Bundler could not find compatible versions for gem "rails": 
    In snapshot (Gemfile.lock): 
    rails (= 4.2.4) 

    In Gemfile: 
    activeadmin (~> 0.6.6) ruby depends on 
     rails (< 4, >= 3.0.0) ruby 

    rails (= 4.2.4) ruby 

Running `bundle update` will rebuild your snapshot from scratch, using only 
the gems in your Gemfile, which may resolve the conflict. 

這是暗示我要下去一個版本的導軌爲了使這個寶石工作,或我可以保持4.2.4和使用建議的軟件包更新方法,而不會導致我的應用程序和其他寶石的任何問題?

回答

2

activeadmin的版本,你的Gemfile指定不支持的Rails 4.從the readme

我們目前正在對1.0.0,它儘可能的依賴,移動 我們從meta_search洗劫並增加了Rails 4支持。

您可以通過跟蹤掌握得到它:

gem 'activeadmin', github: 'activeadmin' 

,也可以使用RubyGems的:

gem 'activeadmin', '~> 1.0.0.pre2' 

更改您的Gemfile如圖所示,然後運行bundle install

+0

非常感謝韋恩。我會嘗試你現在提供的紅寶石代碼,並在一分鐘內回覆 –

+0

wayne你是一個傳奇。有效。感謝你們對我的幫助。問候 –

相關問題