October 26, 2014

Install Ruby On Windows or Linux

Posted by Unknown
0

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 quit 
Using Editor:
  • # In Windows notepad++, RubyWin,...
  • # In Linux vim, gedit, ...

Ruby Overview

Posted by Unknown
0


I. Introduction

  • Ruby is a pure object-oriented programming language.
  • Creater by Matsumoto Yukihiro ( Matz), first version was releases in 1995.
  • You can find the name Yukihiro Matsumoto on the Ruby mailing list at www.ruby-lang.org. Matsumoto is also known as Matz in the Ruby community.
  • Ruby is Opensource, big open community. especially in USA and Japan.
  • Ruby latest version : 2.2.
  • Ruby also is a scripting language. ex: if you are not familiar with shell (in unix) or batch (in windows) , Ruby is good choice.
  • Web framework written by Ruby : Ruby on Rails.
  • Famous service in the world using Ruby as their backbone : Twitter, Github, Basecamp, Cookpad, SlideShare.

II. Ruby Feature

  • Pure OOP (Object Oriented Programming).
  • Class Base (vs prototype-based language as javascript).
  • Dynamic language.
  • Reflection.

III. Tools 

You will need a latest computer like Intel Core i3 or i5 with a minimum of 2GB of RAM (4GB of RAM recommended). You also will need the following software:
  • Linux or Windows OS.
  • Webserver : Apache,...
  • Webbrowser: Chrome, IE, ...
  • Ruby 1.9 or latest.

V. Why we love Ruby?

 
 # In C/C++ 

int main() {
 int t;
 for(int i = 0; i <3 class="str" data-blogger-escaped-i="" data-blogger-escaped-printf="" data-blogger-escaped-span=""> "Hello World! " 
); return 0; } }
 
 # In Ruby  

3.times { print  "Hello World! "  }

IV. What is next ?

  • Install Ruby in Windows and Linux. Test command, using editor, ...
  • Prepare an environment to develop Ruby applications.

Popular Posts

Labels

Archive

 

Blogroll

Recepies

Flickr Images

Copyright © 2014. Tutorials Blog - All Rights Reserved