Ruby installation and running, Ruby installation and running

Source: Internet
Author: User

Ruby installation and running, Ruby installation and running

Ruby Installation

Notes

  1. OSX or linux is better
  2. Implementation of different versions: c ++, C, and java
  3. This C Ruby

Installation Method

  1. Both linux and OSX are pre-installed.
  2. Package Manager (apt, yum, brew), not the latest
  3. Version Control System: rvm (rvm. io), rbenv

Rvm

  1. View ruby version
rvm list known

Install

rvm install 2.2.1

Help

Rvm -- help user manual: man rvm

Rbenv

  1. Use brew to install OSX

Install rubyInstaller in windows

Learning Materials

Tools

Deployment platform in linux

General Installation Method: source code compilation, steps

  1. Download and decompress from official website
  2. ./Config
  3. Make
  4. Put make install in path
  5. Ruby-v view version

Ruby running

Two methods:

Interactive:

1. Use the Ruby command: ruby
2. irb: irb

Compile the program file (. rb)

1. Save the program in the file and run the Ruby command.

vim hello.rbputs "hello world"def hello(name) puts "hello #{name}"endhello('mac')ruby hello.rb

Ruby Document System

RDoc: Document Generation Tool
Ri: Read RDoc

Ri Minari -- serve browser browsing document // localhost: 8214

Articles you may be interested in:
  • Download and install Ruby in windows and linux
  • Common Solution to failure of installing the gem package in ruby
  • Tutorial on installing and configuring Ruby on Rails development environment in Windows
  • Install the Ruby and Rails runtime environments quickly and correctly
  • Change the RubyGem installation Source
  • Install ruby on rails development environment in win7
  • Compile and install Ruby 6.3 In CentOS 2.0
  • How to check whether Gem is installed in Ruby
  • Methods for distinguishing runtime sources in Ruby
  • Tutorial on installing ruby in Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.