Rack Gem :: LoadError,即使我正在使用Bundler

时间:2013-01-17 18:25:59

标签: ruby-on-rails bundler rack

我不明白这是怎么发生的:

$ bundle install
[...]
$ bundle exec rails server
[...] You have already activated rack 1.4.4, but your Gemfile requires rack 1.4.3. Using bundle exec may solve this. (Gem::LoadError)

我不知道怎么可能出现这个错误; Bundler不会保护这个吗?

$ gem list rack

*** LOCAL GEMS ***

rack (1.4.4, 1.4.3, 1.4.1)

在Gemfile中,我们需要明确列出UUID lib的机架,我相信:

gem "rack"

1 个答案:

答案 0 :(得分:3)

我只需卸载我不想要的机架版本即可解决此问题。

gem uninstall rack

Select gem to uninstall:
1. rack-1.4.1
2. rack-1.4.3
3. rack-1.4.4
4. All versions
> 3
Successfully uninstalled rack-1.4.4