我不明白这是怎么发生的:
$ 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 库的 Rack ,我相信:
gem "rack"
最佳答案
我可以通过简单地卸载我不想要的 rack 版本来解决这个问题。
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
关于ruby-on-rails - Rack Gem::LoadError 即使我使用的是 Bundler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14385670/