Ubuntu Install rbenv & Ruby & Rails (Week I)

Source: Internet
Author: User
Tags install node git clone

Advanced Software Engineering

The first Class

Part I

1 Install Essential Dependecies

    1. sudo apt-get update
    2. sudo apt-get install-y build-essential OpenSSL curl Libcurl3-dev libreadline6 libreadline6-dev git-core zlib1g Zlib1g-dev Libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf automake libtool imagemagick libmagickwand-dev Libpcre3-dev Libs Qlite3-dev

2 Install rbenv Environment

    1. git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
    2. echo ' Export path= ' $HOME/.rbenv/bin: $PATH "' >> ~/.BASHRC
    3. Echo ' eval ' $ (rbenv init-) "' >> ~/.BASHRC
    4. SOURCE ~/.BASHRC
    5. Type rbenv
    6. git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

3 Install Ruby Environment

List all version of Ruby, and then you can chose one to install

    1. Rbenv install-l
    2. Rbenv Install 1.9.3-p448

4 Set up Ruby Version and change Gem Source

    1. Rbenv Global 1.9.3-p448 # accroding to the former one
    2. Rbenv Rehash
    3. Gem Sources--remove https://rubygems.org/
    4. Gem Sources-a http://ruby.taobao.org/

5 Install Rails

    1. Gem Install bundler Rails

6 Check The Version

    1. Ruby-v
    2. Gem-v
    3. Rake-v
    4. Rails–v

7 Install node. js

    1. sudo add-apt-repository ppa:chris-lea/node.js
    2. sudo apt-get update
    3. sudo apt-get install Nodejs

8 Test the Environment

    1. CD ~
    2. mkdir Rails
    3. CD Rails
    4. Rails New Blog
    5. CD Blog
    6. Rails Server
    7. http://127.0.0.1:3000

9 Complete

Ubuntu Install rbenv & Ruby & Rails (Week I)

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.