步骤1 - 安装 RVM
1、https://ruby-china.org/wiki/install_ruby_guide
2、http://www.rvm.io/
3、Install GPG keys
4、Install RVM
载入 RVM 环境
$ source ~/.rvm/scripts/rvm
rvm:ok
步骤2 - 用 RVM 安装 Ruby 环境
步骤3 - 设置 Ruby 版本
rvm use 2.5.1 --default
ruby -v
gem -v
安装 Bundler
gem install bundler
上面 3 个步骤过后,Ruby 环境就安装好了,接下来安装 Rails
步骤4 - 安装 Rails 环境
gem install rails
rails -v
rails-guides
https://ruby-china.github.io/rails-guides/getting_started.html
rails new project
sudo apt install nodejs -y
sudo apt install mongodb -y
sudo service mongodb start
gem install : project/
bundle install
rails server