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