本文介绍了如何升级rubygems的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  anujm @ 我需要将gem升级到1.8我试过安装相应的debian软件包,测试:〜$ dpkg -l | grep -i ruby​​gem 
ii ruby​​gems 1.3.5-1ubuntu2 Ruby库/应用程序的包管理框架
ii ruby​​gems-lwes 0.8.2-1323277262 LWES ruby​​gems
ii ruby​​gems1.8 1.3.5-1ubuntu2 Ruby库/应用程序的包管理框架
ii ruby​​gems1.9 1.3.5-1ubuntu2 Ruby库/应用程序的包管理框架
anujm @ test:〜$


anujm @ test:〜$ gem
gem gem1.8 gem1.9
anujm @ test:〜$ sudo gem1.8 install serve
错误:安装服务器时出错:
multi_json需要RubyGems版本> = 1.3.6
anujm @ test:〜$


解决方案

安装rubygems-更新

  gem install ruby​​gems-update 
update_rubygems
gem update --system

code>

以root身份运行此命令或使用sudo。


I need to upgrade gems to 1.8 i tried installing the respective debian packages but it seems its not getting upgraded

anujm@test:~$ dpkg -l |grep -i rubygem
ii  rubygems                               1.3.5-1ubuntu2                                  package management framework for Ruby libraries/applications
ii  rubygems-lwes                          0.8.2-1323277262                                LWES rubygems
ii  rubygems1.8                            1.3.5-1ubuntu2                                  package management framework for Ruby libraries/applications
ii  rubygems1.9                            1.3.5-1ubuntu2                                  package management framework for Ruby libraries/applications
anujm@test:~$ 


anujm@test:~$ gem
gem     gem1.8  gem1.9  
anujm@test:~$ sudo gem1.8 install serve
ERROR:  Error installing serve:
        multi_json requires RubyGems version >= 1.3.6
anujm@test:~$
解决方案

Install rubygems-update

gem install rubygems-update
update_rubygems
gem update --system

run this commands as root or use sudo.

这篇关于如何升级rubygems的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 22:10