CentOS 7
Sponsored Link

Ruby on Rails 5
Install Ruby on Rails 5 to build Ruby Framework environment.
[2] Install some other required packages.
# install from EPEL, SCLo

[[email protected] ~]#
yum --enablerepo=epel,centos-sclo-rh -y install rh-ruby23-ruby-devel nodejs gcc make libxml2 libxml2-devel mariadb-devel zlib-devel libxslt-devel
[3] Install Rails 5.
[[email protected] ~]#
gem install bundler

[[email protected] ~]#
gem install nokogiri -- --use-system-libraries

[[email protected] ~]#
gem install rails --no-ri --no-rdoc

[[email protected] ~]#
rails -v

Rails 5.0.0
[4] Create a sample application and make sure it works normally.
Install MariaDB Server first, refer to here.
[[email protected] ~]#
gem install mysql2 --no-ri --no-rdoc -- --with-mysql-config=/usr/bin/mysql_config

[[email protected] ~]#
rails new SampleApp -d mysql

[[email protected] ~]#
cd SampleApp

[[email protected] SampleApp]#
vi config/database.yml
default: &default
  adapter: mysql2
  encoding: utf8
  pool: 5
  username: root
# MariaDB password

  socket: /var/lib/mysql/mysql.sock
# create test application

[[email protected] SampleApp]#
rails db:create

Created database 'SampleApp_development'
Created database 'SampleApp_test'
[[email protected] SampleApp]#
rails generate scaffold testapp name:string title:string body:text

[[email protected] SampleApp]#
rails db:migrate

[[email protected] SampleApp]#
rails server --binding=

=> Booting Puma
=> Rails 5.0.0 application starting in development on
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://
Use Ctrl-C to stop
[5] Access to the "http://(server's hostname or IP address):3000/" from a client computer. It's OK if following site is displayed normally.
  Access to "http://(server's hostname or IP address):3000/testapps/", then it's possbile to use sample app like follows.