sh 升级/安装ruby 2.1.2 #ubuntu#12.04#14.04

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 升级/安装ruby 2.1.2 #ubuntu#12.04#14.04相关的知识,希望对你有一定的参考价值。

# Reference http://stackoverflow.com/a/18490935/2037928

# Login as root

# Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev

cd /tmp

# Download appropriate ruby version https://www.ruby-lang.org/en/downloads/
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz

# Unpack
tar -xvzf ruby-2.2.0.tar.gz
cd ruby-2.2.0/

# Compile from source
./configure --prefix=/usr/local
make
make install

# Make sure deploy user has access to installing gems
chown -R deploy:staff /usr/local/bin
chown -R deploy:staff /usr/local/lib/ruby

# Login as deploy user

# Install bundler
gem install bundler

# Locally
cap production deploy

# Remove the old manifest.yml file
rm /u/apps/YOUR_APP_NAME/shared/assets/manifest.yml

# I also had to make the unicorn binary into a binstub

以上是关于sh 升级/安装ruby 2.1.2 #ubuntu#12.04#14.04的主要内容,如果未能解决你的问题,请参考以下文章

sh 升级/安装ruby 2.1.2 #ubuntu#12.04#14.04

sh 升级/安装ruby 2.1.2 #ubuntu#12.04#14.04

sh 为已安装的每个版本的ruby升级rubygems。

WDCP在ubunt下的安装

brew安装与升级

ubunt16.04 下升级cmake