2011-04-24 57 views
2

我需要使用可寻址的2.2.4 gem,但我有2.2.5版本(因为这里讨论的问题:https://github.com/sporkmonger/addressable/pull/33)。我想:如何在rails应用程序中强制使用gem版本?

source 'http://rubygems.org' 
source 'http://gems.github.com' 
gem "addresable", "2.2.4" 

bundle install 

,并得到Could not find gem 'adressable (= 2.2.4, runtime)' in any of the gem sources listed in your Gemfile.

如果我手动安装/卸载宝石由

sudo gem install addressable -v 2.2.4 
sudo gem uninstall addressable -v 2.2.5 

我得到同样的错误。

那么,我该如何强制2.2.4版本为我的应用程序?

回答

6
  1. 您在宝石行中拼写错误“可寻址”。
  2. 您的包可能被锁定在2.2.5 - 尝试运行bundle update。这是违反直觉的,但它会用指定的版本重建你的Gemfile.lock。
  3. 您不再需要gems.github.com作为源代码 - 他们退出构建它并推荐rubygems.org。
+0

愚蠢的错误。谢谢。 – 2011-04-24 20:10:38

相关问题