Ubuntu Ruby on Rails Environment building

Source: Internet
Author: User
Tags gpg ruby on rails

0. System Environment

Uname-a

Linux moyo-desktop3.19.0-21-generic#21-Ubuntu1418:31:112015 x86_64 x86_64 x86_64 GNU/Linux
1. Install Curl

sudo apt-get Install Curl

2. Install RVM

Curl-l Get.rvm.io | Bash-s Stable

> 注意:如果提示错误警告,执行下面命名来获取公钥:gpg --keyserver hkp://keys.gnupg.net409B6B1796C275462A1703113804BB82D39DC0E3>如果依然报错,执行下面命令:curl -sSL https://rvm.io/mpapis.asc | gpg --import ->完成后重新安装rvm:curl -L get.rvm.io | bash -s stable

Activate RVM:

Source/home/cbd/.rvm/scripts/rvm

3. Install Ruby

RVM Install Ruby
"Password will be required to automatically install some dependencies"

-i.‘s!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!‘$rvm_path-i‘s!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!‘$rvm_path--remove https://rubygems.org/-a http://ruby.taobao.org/-l

To see if the installation was successful:

Ruby-v

ruby 2.2.1p85 (2015-02-26revision[x86_64-linux]
4. Install Rails

Gem Install Rails

5. New app

Under the project folder, create a new project app001:

Rails New app001

"Something else needs to be done:"

What you need to install the bundle, terminal will prompt you.
Q: It is not clear how a one-time gem install all dependencies, at present I am installed, very long, I hope to know the method of friends to guide!

Vim Gemfile
To modify the source address:
SOURCE ' http://ruby.taobao.org/'
Save.

Implement bundles and install dependencies automatically.

6. Running the service

Running Rails server under the project folder
The browser accesses http://localhost:3000 and displays the Ror Welcome page.

Continue Happy Time ^_^

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ubuntu Ruby on Rails Environment building

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.