2009-02-19 40 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