Bundler could not find compatible versions for gem, updating Rails app Bundler could not find compatible versions for gem, updating Rails app ruby ruby

Bundler could not find compatible versions for gem, updating Rails app


I solved it by deleting the lock rm Gemfile.lock and again running bundle install:

$ rm Gemfile.lock$ bundle installUsing rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.0.4) Using activesupport (3.2.0.rc2) Using builder (3.0.0) Using activemodel (3.2.0.rc2) Using erubis (2.7.0) Using journey (1.0.0) Using rack (1.4.0) Using rack-cache (1.1) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.2) Using actionpack (3.2.0.rc2) Using mime-types (1.17.2) Using polyglot (0.3.3) Using treetop (1.4.10) Using mail (2.3.0) Using actionmailer (3.2.0.rc2) Using arel (3.0.0) Using tzinfo (0.3.31) Using activerecord (3.2.0.rc2) Using activeresource (3.2.0.rc2) Using bundler (1.0.21) Using coffee-script-source (1.2.0) Using execjs (1.2.13) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.6.4) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.0.rc2) Using coffee-rails (3.2.1) Using jquery-rails (2.0.0) Using rails (3.2.0.rc2) Using sass (3.1.12) Using sass-rails (3.2.3) Using sqlite3 (1.3.5) Using uglifier (1.2.2) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

This is a pretty brute force way of fixing the issue. If this is an established project, you may run into other issues after deleting the Gemfile.lock as the dependency versions are no longer locked. However, if this is a new project it's unlikely you will run into problems taking this approach.


As well as sass-rails, you need to bump the version of coffee-rails you depend on too (3.2.1 ought to do it)


If your bundler version is not the same as the BUNDLED WITH in the last line of your Gemfile.lock, it may occur 'could not find compatible versions for gem GEMNAME' only after adding new gem to your Gemfile.