4

我想为我的 rails 项目使用activeadmin,所以我将它添加到我的gemfile中。

 gem 'activeadmin'

并更新了捆绑包,但收到了此错误消息 -

Resolving dependencies...
Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    activeadmin (>= 0) ruby depends on
      actionpack (~> 3.0.0.rc2) ruby

    rails (= 4.0.0) ruby depends on
      actionpack (4.0.0)

我在github上传了项目;这是gemfile的链接- https://github.com/Mashpy/esl/blob/master/Gemfile

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

#gem
 gem 'activeadmin'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

我做错了什么阻止我添加activeadmin?

4

3 回答 3

5

Active Admin 还有一些其他依赖项。使用 Rails 4查看Active Admin install

将所有 gem(在最佳答案中)复制并粘贴到您的 gemfile 中,运行 bundle 应该没有任何问题。

于 2013-10-31T02:32:44.747 回答
4

您可以使用 -

bundle update

然后

bundle install

确保您的gem配置正确。

于 2016-02-22T00:19:48.233 回答
0

我认为你应该升级这些宝石:

sass-rails ~> 3.2.3
coffee-rails ~> 3.2.1

参考:

http://guides.rubyonrails.org/3_2_release_notes.html

于 2016-02-12T14:23:45.023 回答