How to upgrade rubygems

Anuj picture Anuj · Nov 29, 2012 · Viewed 226.1k times · Source

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:~$

Answer

Sacx picture Sacx · Nov 29, 2012

Install rubygems-update

gem install rubygems-update
update_rubygems
gem update --system

run this commands as root or use sudo.