0

I am trying to install activeadmin-globalize My system:

Rails 3.2.13 ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux] Gem 1.8.23

Added this to Gemfile: gem "activeadmin-globalize", git: 'https://github.com/stefanoverna/activeadmin-globalize', branch: 'master'

Then bundle install

Then it gives me error:

Updating https://github.com/stefanoverna/activeadmin-globalize
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    activeadmin-globalize (>= 0) ruby depends on
      activemodel (< 5, >= 4.0.0) ruby

    paperclip (~> 3.0) ruby depends on
      activemodel (3.2.13)

Before this other gem installations didn't fail.

My Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2'
gem 'therubyracer'
gem "passenger", "~> 4.0.37"
gem "ancestry", "~> 2.0.0"
gem 'friendly_id'
gem 'devise'

gem "activeadmin-globalize", git: 'https://github.com/stefanoverna/activeadmin-globalize', branch: 'master'
#gem "jquery-rails", "< 3.0.0"
gem 'jquery-rails', '~> 2.3.0'
gem 'activeadmin'
gem 'will_paginate', '3.0' 
gem 'globalize3'
#gem 'jquery-ui-rails'
gem "paperclip", "~> 3.0"
gem "tinymce-rails", "~> 3.5.9.pre2"

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

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

  gem 'uglifier', '>= 1.0.3'
end

#gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
Edgars
  • 913
  • 1
  • 19
  • 53
  • Try removing your Gemfile.lock and rebundle. – BroiSatse Jun 10 '14 at 11:22
  • @BroiSatse Thanks, but still the same error. – Edgars Jun 10 '14 at 11:27
  • you have gem version conflict, please post Gemfile. and Gemfile.lock – Roman Kiselenko Jun 10 '14 at 11:31
  • 4
    Your error is due to activeadmin-globalize listing a dependency of globalize gem ~> 4.0.0. Globalize required ActiveRecord > 4 i.e. Rails 4. There is a version of globalize available for ActiveRecord 3 but not of the gem you're using. There is an [issue](https://github.com/stefanoverna/activeadmin-globalize/issues/29) that suggests using activeadmin-globalize3 gem, which looks like your only option if you don't want to write something yourself. – j-dexx Jun 10 '14 at 11:31
  • 1
    Could you please post your gemfile? – BroiSatse Jun 10 '14 at 11:33
  • 1
    @BroiSatse I think removing Gemfile.lock is a dangerous advice. It might help debugging cases in which such an error is caused by a locked-versions conflict but in a production project this leads to a blind-update of all gems. As most people do not limit the max-allowed version of a gem, this can cause big trouble that is hard to debug later. Again, it for sure helps debugging and dig for the solution, but should be used with caution, especially by people that are not too familiar with Bundler and its problems yet. – Peter Sorowka Jun 10 '14 at 12:02

1 Answers1

3

You trying to use activemodel >= 4.0 (part of Rails 4.0) with Rails 3.0.

Probably you should use one of older versions of activeadmin-globalize (if it requires lower version of activemodel).

Or You can upgrade your Rails to version >= 4.0

antono
  • 978
  • 1
  • 7
  • 18
  • How can I check if my app will still function properly or revert back to Rails 3 if that happens ? Tnx – Edgars Jun 10 '14 at 12:15
  • 1
    @EdgarsRozenfelds check if your app still function properly: that is what tests are meant for. revert back to rails 3: use a version control system like git and try the upgrade in a branch which you can merge to into the master branch if it works or discard if it fails. – Peter Sorowka Jun 10 '14 at 12:44