“gem update --system is disabled on Debian” error

前端 未结 3 970
孤独总比滥情好
孤独总比滥情好 2021-02-06 02:11

When I try to update rubygems (by running \'gem update --system\') I get this error:

ERROR:  While executing gem ... (RuntimeError)
gem update --system is disabl         


        
相关标签:
3条回答
  • 2021-02-06 02:27

    in debian wheezy

    • remove rubygems

      apt-get remove rubygems

    • get a source

      wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.7.tgz

    • uncompress source

      tar zxvf rubygems-1.8.7.tgz

    • move directory

      cd rubygems-1.8.7

    • run setup.rb with ruby

      ruby setup.rb

    • update system

      gem update --system

    then it'll installing newest versionand

    0 讨论(0)
  • Just from reading the error message, I'd suggest updating RubyGems via apt (sudo apt-get install rubygems) instead of from within RubyGems.

    0 讨论(0)
  • 2021-02-06 02:39

    There are two ways: get rid of the debian ruby package and install ruby from source, or you can follow the instrucions given to you:

    RubyGems can be updated using the official Debian repositories by aptitude or apt-get.

    the rubygems with debian is managed by apt, and so you need to update it with it. If you don't want to, you need to install ruby on you own, without using apt. Or at least you need to install ruby-gems on you own. Try this:

    [sudo] apt-get remove rubygems
    wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
    tar xzf rubygems-1.3.7.tgz
    cd rubygems-1.3.7
    [sudo] ruby setup.rb
    
    0 讨论(0)
提交回复
热议问题