Please refer to the following articles for the environment etc. Ssh connection to Sakura's VPS + minimum security measures
First, install git to use git clone
.
$ sudo yum -y install git
$ git --version
Install rbenv, a tool for managing Ruby versions.
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build #'rbenv install'Plugins required to execute commands
This is a related package for installing ruby. Without this, it seems to be moss when rbenv install.
$ yum -y install bzip2 gcc openssl-devel readline-devel zlib-devel
Edit the bash_profile that is loaded at shell startup so that you can use the rbenv command.
$ vi ~/.bash_profile
~/.bash_profile
#abridgement
PATH=$PATH:$HOME/bin
export PATH
export PATH="$HOME/.rbenv/bin:$PATH" #Postscript
eval "$(rbenv init -)" #Postscript
$ source ~/.bash_profile
$ rbenv -v
Now that the rbenv settings are complete, it's time to install Ruby.
$ rbenv install 2.4.1
$ rbenv global 2.4.1
$ rbenv rehash
$ ruby -v
Install the tool bundler
that makes managing gems nice.
$ gem install bundler
Yarn is required to run Rails6.
$ yum install -y nodejs npm --enablerepo=epel
$ npm install -g yarn
-[(For beginners) Until you sign up for vps and deploy the Rails app on capistrano3 [Part 1 Server Settings]](https://qiita.com/ryo2132/items/f62690f0b16ec11270fe#5-mysql%E3%81 % AE% E8% A8% AD% E5% AE% 9A)
Recommended Posts