Bundler could not find compatible versions for gem "rails", but version is installed

Matthew Cordaro

Noob following installation directions from here.

Doing a bundle install getting the following error:

Bundler could not find compatible versions for gem "rails":  
  In Gemfile:  
    open_conference_ware (~> 1.0.0.pre) ruby depends on
      rails (~> 4.0.2) ruby
    rails (4.1.8)

So I did sudo gem install rails -v 4.0.2 and now according to gem list:

rails (4.1.8, 4.0.2)

But I still recieve the error!
Doesn't 4.0.2 qualify?
Is there something I need to set to force the proper version?

Matthew Cordaro

Yes, on both accounts. (Please see EDIT below)

When you run rails new SOMEPROJECT --skip-bundle it will auto generate a file called Gemfile. (Think of it as a header file as it includes the dependencies for SOMEPROJECT that Bundler will setup for you.) When it is generated, it will automatically default to the most current version installed on your system. So you must modify it to point to the proper version of rails:

Change line gem 'rails', '4.1.8' to gem 'rails', '4.0.2'.

Now you can continue with bundle install.

EDIT: Because you will likely run into this issue later, it is better to regenerate the project altogether by specifying the version in the rails new command:

rm -r SOMEPROJECT
rails _4.0.2_ new SOMEPROJECT --skip-bundle

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ActiveAdmin with Rails 4: Bundler could not find compatible versions for gem "rails"

From Dev

ActiveAdmin with Rails 4: Bundler could not find compatible versions for gem "rails"

From Dev

RoR - Bundler could not find compatible versions for gem "rails"

From Dev

Bundler could not find compatible versions for gem "rubyzip"

From Dev

Bundler could not find compatible versions for gem "activemodel"

From Dev

Bundler could not find compatible versions for gem "sass"

From Dev

Bundler could not find compatible versions for gem "builder" and "bundler":

From Dev

Elastic Beanstalk, Bundler could not find compatible versions for gem "bundler"

From Dev

Bundler could not find compatible versions for gem "builder" and "bundler":

From Dev

Installing Rails 4.2.0.beta1 – Bundler could not find compatible versions for gem "sprockets-rails"

From Dev

Bundler could not find compatible versions for gem "mime-types"

From Java

how to fix : Bundler could not find compatible versions for gem "nokogiri"

From Dev

Bundler could not find compatible versions for gem mime-types

From Dev

Bundler could not find compatible versions for gem mime-types

From Dev

Bundler could not find compatible versions for gem "railties" when bundle update

From Dev

Could not find gem installed with bundler

From Dev

Could not find compatible versions for gem "activemodel" on bundle update rails

From Dev

Bundler could not find compatible versions for gem "thor", but it doesn't make any sense

From Dev

Bundler could not find compatible versions for gem "thor", but it doesn't make any sense

From Dev

Could not find bundler (>= 0) amongst [] (Gem::LoadError) with rails 2.3.18

From Dev

Could not find 'bundler' (>= 0) but 'gem list' has 'bundler' gem

From Dev

Old Bundler gem version being used by Rails

From Dev

Rails 4.2 ActiveJob: Every adapter results in PhusionPassenger error: Could not find [gem] in any of the sources (Bundler::GemNotFound)

From Java

CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":

From Java

CocoaPods could not find compatible versions for pod "Firebase/CoreOnly"

From Dev

CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":

From Dev

Rails, Installed Gem version and Gemfile.lock version

From Dev

Could not find rails (>= 0) amongst [bundler-unload-1.0.2, executable-hooks-1.3.2, gem-wrappers-1.2.7, json-1.8.1 error

From Dev

Bundler can't resolve the correct (dependent) version of a gem that's manually installed and removed

Related Related

  1. 1

    ActiveAdmin with Rails 4: Bundler could not find compatible versions for gem "rails"

  2. 2

    ActiveAdmin with Rails 4: Bundler could not find compatible versions for gem "rails"

  3. 3

    RoR - Bundler could not find compatible versions for gem "rails"

  4. 4

    Bundler could not find compatible versions for gem "rubyzip"

  5. 5

    Bundler could not find compatible versions for gem "activemodel"

  6. 6

    Bundler could not find compatible versions for gem "sass"

  7. 7

    Bundler could not find compatible versions for gem "builder" and "bundler":

  8. 8

    Elastic Beanstalk, Bundler could not find compatible versions for gem "bundler"

  9. 9

    Bundler could not find compatible versions for gem "builder" and "bundler":

  10. 10

    Installing Rails 4.2.0.beta1 – Bundler could not find compatible versions for gem "sprockets-rails"

  11. 11

    Bundler could not find compatible versions for gem "mime-types"

  12. 12

    how to fix : Bundler could not find compatible versions for gem "nokogiri"

  13. 13

    Bundler could not find compatible versions for gem mime-types

  14. 14

    Bundler could not find compatible versions for gem mime-types

  15. 15

    Bundler could not find compatible versions for gem "railties" when bundle update

  16. 16

    Could not find gem installed with bundler

  17. 17

    Could not find compatible versions for gem "activemodel" on bundle update rails

  18. 18

    Bundler could not find compatible versions for gem "thor", but it doesn't make any sense

  19. 19

    Bundler could not find compatible versions for gem "thor", but it doesn't make any sense

  20. 20

    Could not find bundler (>= 0) amongst [] (Gem::LoadError) with rails 2.3.18

  21. 21

    Could not find 'bundler' (>= 0) but 'gem list' has 'bundler' gem

  22. 22

    Old Bundler gem version being used by Rails

  23. 23

    Rails 4.2 ActiveJob: Every adapter results in PhusionPassenger error: Could not find [gem] in any of the sources (Bundler::GemNotFound)

  24. 24

    CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":

  25. 25

    CocoaPods could not find compatible versions for pod "Firebase/CoreOnly"

  26. 26

    CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":

  27. 27

    Rails, Installed Gem version and Gemfile.lock version

  28. 28

    Could not find rails (>= 0) amongst [bundler-unload-1.0.2, executable-hooks-1.3.2, gem-wrappers-1.2.7, json-1.8.1 error

  29. 29

    Bundler can't resolve the correct (dependent) version of a gem that's manually installed and removed

HotTag

Archive