I. Ruby Overview
![]() |
RubyInstaller |
II. Install Ruby
- In Windows
-
Download and Install
- Download rubyinstaller
- Double click rubyinstaller.exe to install.
-
Run
- Finished, go to run -> cmd ->
irb or run Interactive Ruby
- In Linux
-
Install with yum
- # yum install ruby
-
Install other way
- $ rpm -ivh install wget #Install wget for download package from internet
- $ cd /tmp
- $ wget > <source> /ruby-2.x.x #Download ruby from internet
- $ rpm -ivh install ruby-2.x.x or $ yum install ruby-2.x.x
-
Run
- Finished, go to Terminal and enter irb
III. Test install
$ ruby -v
$ ruby -e "puts 'Hello World! '"
IV. More
Similar man command in shell, in ruby using ri command :# using ri command $ ri puts # press q to quitUsing Editor:
- # In Windows notepad++, RubyWin,...
- # In Linux vim, gedit, ...
ruby

0 comments:
Post a Comment