1
votes

Am trying to install my own project onto a secondary computer - both are macosx 10.8.4, both setup using macports and RVM.

For some reason as I'm trying to bundle install I'm getting this error:

```

Bundler could not find compatible versions for gem "ransack": In Gemfile: activeadmin (>= 0) ruby depends on ransack (>= 1.0.0) ruby

ransack (0.7.3)

Bundler could not find compatible versions for gem "actionpack": In Gemfile: ransack (>= 0) ruby depends on actionpack (>= 4.0.0) ruby

sass-rails (~> 4.0.0) ruby depends on
  actionpack (4.0.0.beta1)

```

Not sure why bundle install works fine on one computer and not the other; I recently participated in this ransack issue on with activeadmin on github and it seemed to be fixed; unsure why it's popping up again.

UPDATE: gem file:

            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 'ZenTest'

            # Add Foundation Here
            #gem 'compass-rails' # you need this or you get an err
            # gem 'compass-rails', github: 'milgner/compass-rails', branch: 'rails4'
            # gem 'zurb-foundation', '~> 4.0.0'

            gem 'paperclip',  '>= 3.4.0'  # image upload
            gem 'aws-sdk'



            # gem 'bootstrap-sass', '~> 2.3.2.1' 
            gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
                                          :github => 'anjlab/bootstrap-rails',
                                          :branch => '3.0.0'

            gem 'devise',  github: 'plataformatec/devise'
            gem 'devise_security_extension', :github => 'phatworx/devise_security_extension' # security questions


            # administration
            gem 'activeadmin',         github: 'gregbell/active_admin', branch: 'rails4'
            gem 'ransack',             github: 'ernie/ransack',         branch: 'rails-4'
            gem 'inherited_resources', github: 'josevalim/inherited_resources'
            gem 'formtastic',          github: 'justinfrench/formtastic'


            gem "rich", github: 'bastiaanterhorst/rich'

            # gem 'active_admin_editor'

            gem 'survey', :git => 'git://github.com/runtimerevolution/survey.git'

            # voting
            # gem 'acts_as_votable', github: 'ryanto/acts_as_votable' 
            gem "acts_as_votable", "~> 0.7.1"

            gem 'friendly_id', '5.0.0.beta4' # Note: You MUST use 5.0.0 or greater for Rails 4.0+

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

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

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

            # Use Capistrano for deployment
            # gem 'capistrano', group: :development

            # Use debugger
            # gem 'debugger', group: [:development, :test]

            group :development do
              gem 'better_errors'
              gem 'binding_of_caller'
              gem 'meta_request'
              gem 'rspec-rails'
              gem 'spork'
              gem 'spork-rails', :github => 'sporkrb/spork-rails'
              gem 'annotate'
            end

            group :test do
                gem 'rspec'
                gem 'autotest'
                gem 'autotest-growl'
                gem 'autotest-fsevent'
            end
1
Is your Gemfile.lock committed to version control? If not you should add it and then update your second computer. The Gemfile.lock is what guarantees that the same gem versions are used on all systems.Tim Moore
Ah; fairly new to ROR, had read somewhere else about deleting the Gemfile.lock in another thread; good info to have, thanks.grimmwerks
It's common for people on Stack Overflow to recommend deleting Gemfile.lock as a generic solution to Bundler problems, but IMO this is a bad idea. The point of the lock file is to make things consistent across machines, and that's almost always a good thing! :)Tim Moore

1 Answers

1
votes

I think you don't want to use the rails-4 branch of ransack. It looks like the current master version supports Rails 4.

The dependency on the rails4 branch of activeadmin says that it needs ransack >= 1.0.0, but the version of ransack on the rails-4 branch is 0.7.3.

It is probably a better idea to use the released versions of gems from Rubygems unless you need specific unreleased fixes in the Git repo.