Setup Ruby

Ruby is a dynamic, reflective, object-oriented, general-purpose programming language

  1. Setup ruby by rvm

    a. Install curl: yum install curl

    b. Add key: gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

    c. Install rvm: \curl -sSL https://get.rvm.io | bash -s stable

    d. Reload profile: source $HOME/.bash_profile

    e. Install ruby 1.8.7: rvm install 1.8.7

    f. Install ruby 1.9.3: rvm install 1.9.3

    g. Install ruby latest: rvm install ruby --latest

    h. Install ruby default: rvm use 1.8.7 --default

  2. Setup ruby and gem by manual

    cd ~
    wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz
    tar xzvf ruby-1.9.3-p448.tar.gz
    cd ruby-1.9.3-p448
    # default path, ruby install to /usr/local
    ./configure
    # to change default path, specify with parameter --prefix
    # ./configure --prefix=/usr
    make && make install
    
  3. Setup ruby by yum

    a. Install ruby: yum -y install ruby ruby-devel

    b. Install ruby gems: yum -y install rubygems

  4. Setup ruby 1.9.3 on EC2 Instance by yum

    a. Install ruby: sudo yum -y install ruby19 ruby19-devel

    b. Install ruby gems: yum -y install rubygems

  5. Upgrade gem to lastest version: gem update --system

  6. Install aws-sdk for ruby

    a. Required package: yum -y install gcc libxml2 libxml2-devel libxslt libxslt-devel

    b. Additional required package for ruby 1.8.7: yum -y install rubygem-nokogiri

    c. Install aws-sdk: gem install aws-sdk

  7. Install mysql gem for ruby: gem install ruby-mysql

  8. Install rails: gem install rails

  9. Install ruby in windows

    a. Download ruby

    b. Install development kit

    • Download development kit, please get kit compatibility with you ruby version
    • Extract file to directory <DEVKIT_INSTALL_DIR>, e.g. C:\DevKit
    • Run CMD
    • cd <DEVKIT_INSTALL_DIR>
    • ruby dk.rb init
    • Edit the generated config.yml file to include installed Rubies not automatically discovered or remove Rubies you do not want to use the DevKit with
    • ruby dk.rb install

Comments

Popular posts from this blog

Reduce TIME_WAIT Socket Connections