2. install rvm
ubuntu有自己的安装方式(curl方式会报pgp相关错误)
ubuntu install rvm 安装方式https://github.com/rvm/ubuntu_rvm
rvm安装完时的提示:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask
u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
提示:terminal rvm: command not found 可以输入/bin/bash -login
执行下rvm -v察看版本
rvm 1.27.0 (manual) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
cd app 进入项目文件夹
如果显示:
********************************************************************************
* NOTICE *
********************************************************************************
* RVM has encountered a new or modified .rvmrc file in the current directory, *
* this is a shell script and therefore may contain any shell commands. *
* *
* Examine the contents of this file carefully to be sure the contents are *
* safe before trusting it! *
* Do you wish to trust '/home/tt/.rvmrc'? *
* Choose v[iew] below to view the contents *
********************************************************************************
y[es], n[o], v[iew], c[ancel]> n (输入n)
rails s 启动rails (rails s -p 9000指定端口)
显示:
=> Booting WEBrick
=> Rails 4.1.4 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2016-11-29 16:55:10] INFO WEBrick 1.3.1
[2016-11-29 16:55:10] INFO ruby 2.2.0 (2014-12-25) [x86_64-linux]
[2016-11-29 16:55:10] INFO WEBrick::HTTPServer#start: pid=10726 port=3000