ubuntu server 14.04安装新版本ruby

安装ruby


sudo apt-get install ruby


$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem -v
1.8.23



参考https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng

添加ruby的ppa源

sudo add-apt-repository ppa:brightbox/ruby-ng

 Next generation Ubuntu packages for Ruby 2.3, 2.2, 2.1, 2.0 1.9.3 and 1.8 EE.

See https://www.brightbox.com/docs/ruby/ubuntu/ for more details.

This PPA no longer includes Phusion Passenger packages, and NGINX packages with Passenger support. See https://launchpad.net/~brightbox/+archive/ubuntu/passenger-legacy

Discussion list here: https://groups.google.com/forum/#!forum/brightbox-ruby-ubuntu-packaging

https://www.brightbox.com
 More info: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp6rrmbv29/secring.gpg' created
gpg: keyring `/tmp/tmp6rrmbv29/pubring.gpg' created
gpg: requesting key C3173AA6 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp6rrmbv29/trustdb.gpg: trustdb created
gpg: key C3173AA6: public key "Launchpad PPA for Brightbox" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

更新

sudo apt-get update

安装ruby2.3

sudo apt-get install ruby2.3
sudo apt-get install ruby2.3-dev

$ ruby -v 
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-gnu]

$ gem -v
2.5.1

更新源

sudo gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/

sudo gem update --system -V


sudo gem update -V


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值