Three methods for installing Ruby in Ubuntu
Ruby is an open-source dynamic programming language. It has excellent syntax and can be used to build scalable Web applications. Ruby gems can greatly improve the development efficiency of Ruby developers.
There are several methods to install Ruby on Ubuntu, each of which can be completed in just a few steps.
Method 1: Install with apt-get
You can directly use two commands to install Ruby.
# Sudo apt-get update
# Sudo apt-get install ruby
Or
# Sudo apt-get install ruby2.0
Method 2: Use the brightbox ppa repository for Installation
# Sudo apt-get install python-software-properties
# Sudo apt-add-repository ppa: brightbox/ruby-ng
# Sudo apt-get update
# Sudo apt-get install ruby2.1 ruby2.1-dev
Method 3: Install with RVM
RVM is a Ruby version manager tool.
1. Install RVM
# Sudo apt-get curl
# Curl-L https://get.rvm.io | bash-s stable
# Source ~ /. Rvm/scripts/rvm
2. environment dependency for installing RVM
# Rvm requirements
3. Install Ruby
# Rvm install ruby
If you want to install multiple Ruby versions on Ubuntu, you can use the following command to specify rvm as the default Ruby version management.
# Rvm use ruby -- default
Check the Ruby version that is successfully installed.
# Ruby-v
Install gems
# Gem list
# Gem install [gem-name]
For example, you can write sass with gem-name.
To install gems locally, run the following command:
# Gem install -- local [path of gem file]
You can run the following command to update installed gems:
# Gem update -- system
Or
# Gem update
How to traverse objects in a specified directory in Ruby
Build Ruby On Rails in Ubuntu
Build Ruby on Rails on Ubuntu 13.10
Ruby on Rails 4 Tutorial Chinese Version HD complete PDF
Ruby details: click here
Ruby: click here