2009-02-19 68 views
10

我試圖安裝一個像這樣的寶石:我怎麼能強迫寶石升級到1.3.1寶石

C:\InstantRails\rails_apps\foodmarksthespot>ruby script/plugin install git://github.com/lazyatom/engines.git 

它返回此消息:

Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again. 

但是,當我嘗試更新使用:

gem update --system 

它說:

Updating RubyGems 
Nothing to update 

這是在windows上。我如何強制它將系統升級到特定版本?

回答

16

http://rubyforge.org/forum/forum.php?forum_id=28071

從那裏:

 
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no 
rubygems-update installed. You will need to follow the second set of update 
instructions if you see "Nothing to update". 

If you have an older version of RubyGems installed, then you can still 
do it in two steps: 

$ gem install rubygems-update (again, might need to be admin/root) 
$ update_rubygems (... here too) 
+0

我有rubygems 1.0.1和最後解決方案與我一起工作。 UP投票。 :) – ecleel 2009-06-07 19:59:57

0

如果在cmd中運行gem --version,會得到什麼結果?這聽起來像你在cmd中運行的gem可執行文件與Rails使用的不同。

+0

gem --version返回1.2.0。意味着將其包含在消息中。 – 2009-02-19 18:58:33

1

如果你想安裝一個特定的版本,然後嘗試像下面這樣。

$gem install -v=version_number package_name

例如,在你的情況應該是,

$gem install -v=1.3.1 RubyGems