Wednesday, March 9, 2016

Using Ruby properly in Linux with RVM

3 lượt xem comment 0 comments

RVM is a virtual env manager in ruby. This kind of solution is very common currently. In Python and Go we have similar solutions for instance. This is needed because sometimes libraries have different version and conflicts and this makes the process way easier to deal with.

Today as you go down to the isolation and container era you tend to have better separation between development, test and production envs  but even with that is easier to manage dependencies using this kind of systems.

For this blog post i will show how to download, install and configure rvm and install a ruby version on it for Ubuntu Linux.

Installing RVM in Ubuntu Linux

Install RVM

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash
source ~/.rvm/scripts/rvm
type rvm | head -n 1
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile

Install Ruby

rvm install 2.1
rvm use 2.1
ruby -v
rvm use 2.1 --default

Ruby 2.4.4

source ~/.rvm/scripts/rvm
rvm install 2.4.4
rvm use 2.4.4
rvm use 2.4.4 default
gem install bundler
view raw rvm.md hosted with ❤ by GitHub
Have fun.

Cheers,
Diego Pacheco
Tags: blog, blog,

comment 0 comments

Chuyên mục văn hoá giải trí của VnExpress

.

© 2017 www.blogthuthuatwin10.com

Tầng 5, Tòa nhà FPT Cầu Giấy, phố Duy Tân, Phường Dịch Vọng Hậu, Quận Cầu Giấy, Hà Nội
Email: nguyenanhtuan2401@gmail.com
Điện thoại: 0908 562 750 ext 4548; Liên hệ quảng cáo: 4567.