【问题标题】:Rails 4: activeadmin error message - Bundler could not find compatible versions for gem "actionpack"Rails 4:activeadmin 错误消息 - Bundler 找不到 gem“actionpack”的兼容版本
【发布时间】:2013-10-29 05:09:37
【问题描述】:

我想将activeadmin 用于我的rails 项目,所以我将它添加到我的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?

【问题讨论】:

    标签: ruby-on-rails-4 activeadmin


    【解决方案1】:

    Active Admin 还有一些其他依赖项。看看这个Active Admin install with Rails 4

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

    【讨论】:

      【解决方案2】:

      您可以使用 -

      更新您的捆绑包
      bundle update
      

      然后

      bundle install
      

      确保您的 gems 配置正确。

      【讨论】:

        【解决方案3】:

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

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

        参考文献:

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

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2019-03-28
          • 2022-08-14
          • 2017-04-07
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-10-31
          • 2013-06-30
          相关资源
          最近更新 更多