Reputation: 491
Trying to install ActiveAdmin on a Rails 4 project, and am getting this error:
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activeadmin (>= 0) ruby depends on
activerecord (~> 3.0) ruby
rails (= 4.0.0) ruby depends on
activerecord (4.0.0)
I've followed this example: Active admin install with Rails 4 and added activeadmin to the gemfile like so:
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
But still no go; same error.
Upvotes: 3
Views: 2685
Reputation: 2552
Use
gem 'activeadmin', github: 'gregbell/active_admin'
in Gemfile
Upvotes: 0
Reputation: 204
It depends on which version you are using Rails 4.1 or 4.0.
If yo are using Rails 4.0.X just use master and you are ready to go:
gem 'activeadmin', github: 'gregbell/active_admin'
For Rails 4.1 you should use master and the following dependency branches:
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'polyamorous', github: 'activerecord-hackery/polyamorous'
gem 'ransack', github: 'activerecord-hackery/ransack'
gem 'formtastic', github: 'justinfrench/formtastic'
After that just
bundle install (or bundle update, if necessary)
and run
rails generate active_admin:install (if necessary) to install
Upvotes: 1
Reputation: 491
Ah my mistake; I thought I didn't have to include all the others since I wasn't using them; but it's not ActiveAdmin that is having a problem with ActiveRecord but something that AA depends on:
https://github.com/gregbell/active_admin/issues/2322
Upvotes: 1