I am trying to upgrade my rails application from 5.2.2 to version 6.0.0.beta1. Ruby version currently using is ruby-2.5.3. But it gives me dependencies issues related to already added gems. Likewise in case of paper_trail. I have tried by forking paper_trail gem, comment out the dependencies inside gemspec files and provide a reference to that forked application to application. It removes dependencies but still doesn't work for me. Any idea on how to use this gem in rails 6.0.0beta1 version?
Steps to upgrade rails version in my application:
Changed gem 'rails', '~>5.2.2' to gem 'rails', '6.0.0.beta1', github: 'rails/rails', ref: '5a0230c67f852fb21173f99647e76336897446c1'
Run 'bundle update rails'
And it produced issues as below.
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
annotate was resolved to 2.7.4, which depends on
activerecord (< 6.0, >= 3.2)
delayed_job_active_record was resolved to 4.1.3, which depends on
activerecord (< 5.3, >= 3.0)
kaminari was resolved to 1.1.1, which depends on
kaminari-activerecord (= 1.1.1) was resolved to 1.1.1, which depends on
activerecord
paper_trail was resolved to 10.2.0, which depends on
activerecord (< 6.1, >= 4.2)
rails (= 6.0.0.beta1) was resolved to 6.0.0.beta1, which depends on
activerecord (= 6.0.0.beta1)
rails-erd was resolved to 1.5.2, which depends on
activerecord (>= 3.2)
activeadmin-select2 was resolved to 0.1.8, which depends on
activeadmin was resolved to 1.4.3, which depends on
ransack (>= 1.8.7) was resolved to 2.1.1, which depends on
activerecord (>= 5.0)
seed_dump was resolved to 3.3.1, which depends on
activerecord (>= 4)
state_machines-activerecord was resolved to 0.5.2, which depends on
activerecord (< 6.0, >= 4.1)
textacular was resolved to 5.1.0, which depends on
activerecord (< 6.0, >= 5.0)
Related
Bundler is giving this error when I run bundle install, but actionmailer 5.2.6 is within the range >= 5.2 and < 8! Why is it giving an error? It's doing this for multiple gems. The dependency is within range for all of them.
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
exception_notification (~> 4.2) was resolved to 4.5.0, which depends on
actionmailer (< 8, >= 5.2)
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
actionmailer (= 5.2.6)
Here is an example of another nonsensical error. Obviously 5.0 <= 5.2.6 < 7:
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.2.6)
rails_admin (~> 2.0.1) was resolved to 2.0.2, which depends on
rails (>= 5.0, < 7)
I deleted Gemfile.lock. Bundler version 2.3.9. Gemfile
It was because of this line:
gem 'flip', '~>1.1', :git => 'https://github.com/pda/flip.git'
When commented, it works. When uncommented, it spits out nonsensical errors and buried in the errors is this:
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
flip (~> 1.1) was resolved to 1.1.1, which depends on
activesupport (>= 4.0, <= 5.2)
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
activesupport (= 5.2.6)
I think that is the ONLY error it should have printed out, but that is probably a bug in Bundler. Now I must manually implement that Gem or think of a monkey patch. (I dislike unnecessary and superficial dependencies.)
I am having issues while upgrading rails versions. My ruby version is 2.6.3 and my current rail version is 4.2.1.
I tried with rake rails:update and rails app:update, but both of them gave me this error.
You have requested:
rails = 5.0.7.2
The bundle currently has rails locked at 4.2.11.2.
Try running `bundle update rails`
If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`
Trying what was suggested in the error gave me this error.
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
ancestry was resolved to 3.2.1, which depends on
activerecord (>= 4.2.0)
annotate (~> 2.6.5) was resolved to 2.6.10, which depends on
activerecord (>= 3.2, <= 4.3)
globalize was resolved to 5.3.1, which depends on
activerecord (>= 4.2, < 6.1)
activeadmin was resolved to 1.0.0, which depends on
kaminari (>= 0.15, < 2.0) was resolved to 1.2.1, which depends on
kaminari-activerecord (= 1.2.1) was resolved to 1.2.1, which depends
on
activerecord
rails (= 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
activeadmin was resolved to 1.0.0, which depends on
ransack (~> 1.3) was resolved to 1.8.4, which depends on
activerecord (>= 3.0)
seed_dump was resolved to 3.3.1, which depends on
activerecord (>= 4)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 5.0.0)
active_admin-sortable_tree was resolved to 1.0.0, which depends on
rails (>= 3.2)
My end goal is to upgrade rails 4.x to 6.x. I am going step by step by upgrading rails 4.x to 5.x and then 5.x to 6.x. I am not able to achieve the first phase i.e upgrading 4.x to 5.x.
Any help regarding how can I solve this issue would be much appreciated. Thanks.
I am working on Ruby on Rails application. I am trying to upgrade the rails version from 4.2 to 5.0
I have changed the rails dependency in engine's gemspec file.
On running bundle update in engine it is showing the following error -
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
actionmailer (= 5.2.4.4)
simple_token_authentication was resolved to 1.17.0, which depends on
actionmailer (>= 3.2.6, < 7)
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
actionpack (= 5.2.4.4)
rspec-rails was resolved to 4.0.2, which depends on
actionpack (>= 4.2)
simple_token_authentication was resolved to 1.17.0, which depends on
actionpack (>= 3.2.6, < 7)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
paranoia (~> 2.2) was resolved to 2.4.3, which depends on
activerecord (>= 4.0, < 6.2)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
activerecord (= 5.2.4.4)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
factory_girl_rails was resolved to 4.9.0, which depends on
factory_girl (~> 4.9.0) was resolved to 4.9.0, which depends on
activesupport (>= 3.0.0)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
activesupport (= 5.2.4.4)
rspec-rails was resolved to 4.0.2, which depends on
activesupport (>= 4.2)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
engine was resolved to 0.0.1, which depends on
activeadmin (= 1.0.0.pre2) was resolved to 1.0.0.pre2, which depends on
rails (>= 3.2, < 5.0)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
factory_girl_rails was resolved to 4.9.0, which depends on
railties (>= 3.0.0)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
railties (= 5.2.4.4)
rspec-rails was resolved to 4.0.2, which depends on
railties (>= 4.2)
I tried to delete gemfile.lock of engine and run command bundle install then it is showing the following error -
Bundler could not find compatible versions for gem "rails":
In Gemfile:
engine was resolved to 0.0.1, which depends on
activeadmin (= 1.0.0.pre2) was resolved to 1.0.0.pre2, which depends on
rails (>= 3.2, < 5.0)
engine1 was resolved to 0.0.1, which depends on
engine2 was resolved to 0.0.1, which depends on
rails (~> 5.0)
Do anyone have any idea how to resolve it? Please help!
Re-read the error message, it says exactly what's going on.
Bundler could not find compatible versions for gem "rails":
There is no single version of rails that satisfies all requirements. From your issue description I see that you're trying to update to 5, so lets see what is not okay with 5.
In Gemfile:
engine was resolved to 0.0.1, which depends on
activeadmin (= 1.0.0.pre2)
Engine depends on activeadmin with a fixed version
was resolved to 1.0.0.pre2, which depends on
rails (>= 3.2, < 5.0)
This version requires rails of at least 3.2 and less than 5.0. This disallows rails 5. You'll need to update activeadmin in engine before you update rails in the application using the engine.
After updating to rails 5.1 from 4.2.8 It gives error on running 'bundle update'.
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
protected_attributes (~> 1.1.4) was resolved to 1.1.4, which depends on
activemodel (< 5.0, >= 4.0.1)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activemodel (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activemodel (= 5.1.0)
It seems that protected_attributes gem doesn't compatible with rails version 5.1. Is there any way to tackle this issue without removing protected_attributes gem?
As the project's README states:
This plugin will be officially supported until the release of Rails 5.0
So either maintain your own fork that keeps compatibility with Rails 5.0 and upwards or bite the bullet and embrace strong parameters.
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
1- Make sure you specify the correct rails version in Gemfile
2- Remove Gemfile.lock rm Gemfile.lock
3- bundle install
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.