1. Activated gems vs. Gemfile

    You have already activated <gem version>, but your Gemfile requires <gem old version>.  Using bundler exec may solve this.

    I obsessively update software; this is my second encounter with this issue.  I’ve got an existing project and now the gem’s been updated, but my Gemfile is referencing a previous version and won’t continue as the new version has been ‘activated’.  The issue arose for me while trying to rake some tests.

    Here is how I fixed it (commands assume your in the project’s root folder):

    Delete the Gemfile.lock

    $ rm Gemfile.lock

    Uninstall the old gem

    $ gem uninstall <gem name> -v <version number>

    In my case the command was: $ gem uninstall rake -v 0.9.2

    re-install the bundle

    $ bundle install

    Be sure to check the output of the install to make sure the correct version was picked up and added to the project.  That did it for me, hope it helps you.

    1. weblogofjames posted this