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
How to Detect User Agent in Rails 3.1
How to Run and Debug Ruby on Rails from Visual Studio Code
How to Fix Libv8 Error from Gemfile on Mavericks
Retrieving Image Height with Carrierwave
Ruby: How to Find Out If a Character Is a Letter or a Digit
Marking an Unused Block Variable
Whenever Gem: I Set :Output But the Logfile Doesn't Show Up Where I'D Expect It To
To Make an API Call with an Oauth Token
Advice on Using Modules with Ruby on Rails
Ruby: Eval with String Interpolation
How to Embed Dynamic Ruby Code to "Javascript" Section in Slim Templates
How to Pass <Arguments> to Irb If I Don't Specify <Programfile>
Actiondispatch::Http::Uploadedfile.Content_Type Not Being Initialized in Rspec Test
Ruby - Remove Pattern from String
Does Concurrency Happen Even When Only One Thread Is in a Thread Pool
Attempting to Install Libv8, "Failed to Build Gem Native Extension"