You Have Already Activated Rack 1.3.2, But Your Gemfile Requires Rack 1.2.3. Consider Using Bundle Exec

You have already activated rack 1.6.0, but your Gemfile requires rack 1.6.4

you need to uninstall one version of rack which is not required.

Do this please

gem uninstall rack -v 1.6.0

Reference: How to force rack to work around the usual "You have already activated rack..." bug?

You have already activated X, but your Gemfile requires Y

Using bundle exec is the right way to do this.

Basically what's happening is that you've updated rake to 0.9.2 which now conflicts with the version specified in your Gemfile. Previously the latest version of rake you had matched the version in your Gemfile, so you didn't get any warning when simply using rake.

Yehuda Katz (one of the original Bundler developers) explains it all in this blog post.

To avoid typing bundle exec ... all the time, you could set up an alias or function in your shell for commands you commonly use with Bundler. For example this is what I use for Rake:

$ type bake
bake is a function
bake ()
{
bundle exec rake "$@"
}

How to force rack to work around the usual You have already activated rack... bug?

The problem is this:

  • You have (at least) two versions of Rack installed.

  • Your Gemfile calls for one version (1.3.6). Your current environment is providing another version (1.4.1).

  • By the time your application executes, the current environment has already loaded 1.4.1.

  • Bundler knows you need to load 1.3.6, but it can't load it. You may not load more than one version of the same gem, so the 1.4.1 version wins since it was loaded first.

  • Bundler complains to you.

Uninstall the problematic gems (e.g. gem uninstall rack -v 1.3.6). Even better, use RVM and gemsets to isolate your gems better and you won't encounter this issue.

Phusion Passenger Error: You have activated rack 1.2.1, but your Gemfile requires rack 1.2.2

try to restart your server after edit in your Gemfile and put this: gem 'rack', '1.2.1'

You have already activated rack 1.6.1, but your Gemfile requires rack 1.5.5.

I turns out that I was using Rails 4.1.2 which used Rack 1.5.5. When I updated my Rails app to use Rails 4.2.6 the later version of rack was loaded and this conflict in the gems was solved.

You have already activated rake 0.9.6, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this

At the root of project, do:

gem list rake 

You will see probably more than one version. If so, then remove the version you don't need (i.e. 0.9.6) by command:

gem uninstall rake

it will ask which version to remove. Or try doing

bundle update rake


Related Topics



Leave a reply



Submit