0
votes

I am upgrading to openproject lastest version 6, however while running bundle install, I am getting the following error:

Bundler could not find compatible versions for gem "rails": In snapshot (Gemfile.lock): rails (= 4.2.7.1)

In Gemfile: rails (>= 4.2.7.1, ~> 4.2.7)

health_check was resolved to 1.5.1, which depends on
  rails (>= 2.3.0)

openproject-translations was resolved to 6.0.5, which depends on
  rails (~> 4.2.3)

prototype-rails was resolved to 4.0.0, which depends on
  rails (~> 4.0)

rails-angular-xss was resolved to 0.2.0.pre.pre, which depends on
  rails (< 5.1, >= 5.0.0)

rails_autolink (~> 1.1.6) was resolved to 1.1.6, which depends on
  rails (> 3.1)

Any help would be appreciated.

Thanks, Rahul

2
Please try this. remove Gemfile.lock file and again execute bundle install - Ajay Barot
are you trying to upgrade your rails application ? from lower versions to 4.2.7.1 ? - sa77

2 Answers

0
votes

1- Make sure you specify the correct rails version in Gemfile

2- Remove Gemfile.lock rm Gemfile.lock

3- bundle install

0
votes

You have dependencies which are incompatible.

openproject-translations was resolved to 6.0.5, which depends on
  rails (~> 4.2.3)

This requires rails 4.2.x (where x >= 3)

rails-angular-xss was resolved to 0.2.0.pre.pre, which depends on
  rails (< 5.1, >= 5.0.0)

This requires rails 5.0.x (< 5.1, >= 5.0.0 could be simplified to ~> 5.0.0)

Since openproject-translations requires Rails 4 and rails-angular-xss requires Rails 5 there is no way that bundle can resolve them.

You could try a different version (e.g. rolling back a recent change) of one or both of those gems.

Instead of the 0.2.0.pre.pre version of rails-angular-xss, try the latest release 0.1.0 which will work for your current version of Rails.