Ruby installation and running, Ruby installation and running
Ruby Installation
Notes
- OSX or linux is better
- Implementation of different versions: c ++, C, and java
- This C Ruby
Installation Method
- Both linux and OSX are pre-installed.
- Package Manager (apt, yum, brew), not the latest
- Version Control System: rvm (rvm. io), rbenv
Rvm
- View ruby version
rvm list known
Install
rvm install 2.2.1
Help
Rvm -- help user manual: man rvm
Rbenv
- Use brew to install OSX
Install rubyInstaller in windows
Learning Materials
Tools
Deployment platform in linux
General Installation Method: source code compilation, steps
- Download and decompress from official website
- ./Config
- Make
- Put make install in path
- 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