Skip to content

Instantly share code, notes, and snippets.

@esteedqueen
Created May 21, 2017 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esteedqueen/7abec907c062dc5c85753167dc546be5 to your computer and use it in GitHub Desktop.
Save esteedqueen/7abec907c062dc5c85753167dc546be5 to your computer and use it in GitHub Desktop.
How I fixed `check_version_conflict` error in rails multiple versions

I have multiple verstions of rails and ruby gems on my machine and I ran into the error below when I tried to run any rails command such as rails -v, rails new new_app, etc.

.../ruby/2.3.0/rubygems/specification.rb:2274:in `check_version_conflict': can't activate activesupport-5.1.0, already activated activesupport-5.0.1 (Gem::LoadError)

Here's how I fixed it.

The version conflict points to ActiveSupport so I ran the command below to check the different versions of activesupport on my machine:

gem list | grep activesupport

The result of the command was:

activesupport (5.1.0, 5.0.1, 5.0.0, 4.2.8, 4.2.6, 4.2.5.1, 4.2.5)

Then, I attempted to uninstall both version 5.1.0 and 5.0.1 to see which has the least dependent gems and then chose to uninstall 5.1.0 and it's dependent gems which were only activemodel and activerecord of the same version. Version 5.0.1 had a lot more dependent gems.

The unistall command:

gem uninstall activesupport -v 5.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment