Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 4: activeadmin error message - Bundler could not find compatible versions for gem "actionpack"

I want to use activeadmin for my rails project, so I added it to my gemfile.

 gem 'activeadmin'

and updated the bundle, but received this error message -

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)

I uploaded the project in github; this is the link of the 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

What am I doing wrong that is preventing me from adding activeadmin?

like image 973
Mashpy Rahman Avatar asked Jan 13 '23 01:01

Mashpy Rahman


2 Answers

Active Admin has a few other dependencies as well. Check this out Active Admin install with Rails 4.

Copy and paste all the gems (in the top answer) to your gemfile and you should not have any issues running bundle.

like image 186
Alvin Ang Avatar answered Jan 31 '23 10:01

Alvin Ang


You can update your bundle using -

bundle update

Then

bundle install

To make sure your configuration of the gems are right.

like image 29
gzcarlosrd Avatar answered Jan 31 '23 10:01

gzcarlosrd